From 81cf89845f197048ab08f1f913fe3e48594032da Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 21 May 2021 23:51:53 +0800 Subject: [PATCH] ci: use marvinpinto/action-automatic-releases Signed-off-by: Jianhui Zhao --- .github/workflows/release.yml | 38 ++++++++++++----------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26041b5..dc8142e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,30 +1,22 @@ 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 }} @@ -32,14 +24,10 @@ jobs: 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 \ No newline at end of file