-
-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use marvinpinto/action-automatic-releases
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
- Loading branch information
Showing
1 changed file
with
13 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,33 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- id: changelog | ||
uses: zhaojh329/auto-changelog@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- id: release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: true | ||
body: ${{steps.changelog.outputs.changelog}} | ||
- id: get-version | ||
uses: battila7/get-version-action@v2 | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- id: get-version | ||
uses: battila7/get-version-action@v2 | ||
|
||
- id: release-asset | ||
run: | | ||
version=${{ steps.get-version.outputs.version-without-v }} | ||
cd .. | ||
cp -r rtty rtty-$version | ||
rm -rf rtty-$version/.git* rtty-$version/src/buffer/.git* rtty-$version/src/ssl/.git* rtty-$version/src/log/.git* | ||
tar zcfv rtty-$version.tar.gz rtty-$version | ||
echo "::set-output name=asset-path::../rtty-$version.tar.gz" | ||
echo "::set-output name=asset-name::rtty-$version.tar.gz" | ||
- id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: ${{ steps.release-asset.outputs.asset-path }} | ||
asset_name: ${{ steps.release-asset.outputs.asset-name }} | ||
asset_content_type: application/gzip | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
draft: true | ||
prerelease: false | ||
files: ../rtty-*.tar.gz |