From a99b23e222378a53577d6ae7eb08f6e2854732a8 Mon Sep 17 00:00:00 2001 From: Jean-Marie Renouard Date: Sat, 9 Sep 2023 11:02:46 +0200 Subject: [PATCH] New Github actions --- .github/workflows/publish_release.yml | 44 +++++++++++++++++++++++++++ Makefile | 6 ++-- 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish_release.yml diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml new file mode 100644 index 000000000..ad5e1acad --- /dev/null +++ b/.github/workflows/publish_release.yml @@ -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 }} \ No newline at end of file diff --git a/Makefile b/Makefile index 5b0bd45d7..9a9bef7fe 100644 --- a/Makefile +++ b/Makefile @@ -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)"