Merge pull request #725 from jmrenouard/master

New Github actions
This commit is contained in:
Jean-Marie Renouard 2023-09-09 11:06:24 +02:00 committed by GitHub
commit 960dd9e157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 3 deletions

44
.github/workflows/publish_release.yml vendored Normal file
View File

@ -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 }}

View File

@ -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)"