Skip to content

Commit

Permalink
ci: use marvinpinto/action-automatic-releases
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed May 21, 2021
1 parent ba36668 commit 81cf898
Showing 1 changed file with 13 additions and 25 deletions.
38 changes: 13 additions & 25 deletions .github/workflows/release.yml
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

0 comments on commit 81cf898

Please sign in to comment.