New Github actions
This commit is contained in:
parent
d0ec7ea254
commit
a99b23e222
2 changed files with 47 additions and 3 deletions
44
.github/workflows/publish_release.yml
vendored
Normal file
44
.github/workflows/publish_release.yml
vendored
Normal 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 }}
|
6
Makefile
6
Makefile
|
@ -46,19 +46,19 @@ generate_features:
|
||||||
|
|
||||||
increment_sub_version:
|
increment_sub_version:
|
||||||
@echo "Incrementing sub version from $(VERSION) to $(UPDATE_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 add ./*.md ./mysqltuner.pl
|
||||||
git commit -m "Generate $(UPDATE_SUB_VERSION) sub version at $(shell date --iso=seconds)"
|
git commit -m "Generate $(UPDATE_SUB_VERSION) sub version at $(shell date --iso=seconds)"
|
||||||
|
|
||||||
increment_minor_version:
|
increment_minor_version:
|
||||||
@echo "Incrementing minor version from $(VERSION) to $(UPDATE_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 add ./*.md ./mysqltuner.pl
|
||||||
git commit -m "Generate $(UPDATE_SUB_VERSION) minor version at $(shell date --iso=seconds)"
|
git commit -m "Generate $(UPDATE_SUB_VERSION) minor version at $(shell date --iso=seconds)"
|
||||||
|
|
||||||
increment_major_version:
|
increment_major_version:
|
||||||
@echo "Incrementing major version from $(VERSION) to $(UPDATE_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 add ./*.md ./mysqltuner.pl
|
||||||
git commit -m "Generate $(UPDATE_SUB_VERSION) major version at $(shell date --iso=seconds)"
|
git commit -m "Generate $(UPDATE_SUB_VERSION) major version at $(shell date --iso=seconds)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue