Skip to content

Commit

Permalink
New Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrenouard committed Sep 9, 2023
1 parent d0ec7ea commit a99b23e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v2.2.9' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- First Change
- Second Change
draft: true
prerelease: false
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./path/to/asset.zip
asset_name: asset.zip
asset_content_type: application/zip
- name: Publish release
uses: StuYarrow/publish-release@v1.1.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ steps.create_release.outputs.id }}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ generate_features:

increment_sub_version:
@echo "Incrementing sub version from $(VERSION) to $(UPDATE_SUB_VERSION)"
sed -i "s/$(VERSION)/$(UPDATE_SUB_VERSION)/" mysqltuner.pl *.md
sed -i "s/$(VERSION)/$(UPDATE_SUB_VERSION)/" mysqltuner.pl *.md .github/workflows/*.yml
git add ./*.md ./mysqltuner.pl
git commit -m "Generate $(UPDATE_SUB_VERSION) sub version at $(shell date --iso=seconds)"

increment_minor_version:
@echo "Incrementing minor version from $(VERSION) to $(UPDATE_MINOR_VERSION)"
sed -i "s/$(VERSION)/$(UPDATE_MINOR_VERSION)/" mysqltuner.pl *.md
sed -i "s/$(VERSION)/$(UPDATE_MINOR_VERSION)/" mysqltuner.pl *.md .github/workflows/*.yml
git add ./*.md ./mysqltuner.pl
git commit -m "Generate $(UPDATE_SUB_VERSION) minor version at $(shell date --iso=seconds)"

increment_major_version:
@echo "Incrementing major version from $(VERSION) to $(UPDATE_MAJOR_VERSION)"
sed -i "s/$(VERSION)/$(UPDATE_MAJOR_VERSION)/" mysqltuner.pl *.md
sed -i "s/$(VERSION)/$(UPDATE_MAJOR_VERSION)/" mysqltuner.pl *.md .github/workflows/*.yml
git add ./*.md ./mysqltuner.pl
git commit -m "Generate $(UPDATE_SUB_VERSION) major version at $(shell date --iso=seconds)"

Expand Down

0 comments on commit a99b23e

Please sign in to comment.