From 15816326b8d8b62bf00663000747a29451cc7663 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Thu, 9 Jul 2020 17:38:48 +0300 Subject: [PATCH] ci: rel cleanups --- .github/workflows/release.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0157ecd..b08d5e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ -name: RelBot +name: REL on: push: @@ -8,23 +8,27 @@ on: jobs: release: - name: Create Release + name: Release runs-on: ubuntu-latest steps: - name: Checkout code + id: checkout uses: actions/checkout@v2 - - name: Build + + - name: Build tarball + id: build run: | make checkver make dist EXTENSION=$(grep ^EXTENSION Makefile | sed 's/.*= *//') EXT_VERSION=$(grep ^EXT_VERSION Makefile | sed 's/.*= *//') + test "${{github.ref}}" = "refs/tags/v${EXT_VERSION}" || { echo "ERR: tag mismatch"; exit 1; } echo "::set-env name=EXTENSION::${EXTENSION}" echo "::set-env name=EXT_VERSION::${EXT_VERSION}" echo "::set-env name=TGZ::${EXTENSION}-${EXT_VERSION}.tar.gz" - name: Create release - id: create_release + id: release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} @@ -35,13 +39,13 @@ jobs: draft: false prerelease: false - - name: Upload release - id: upload_release + - name: Upload source + id: upload uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: - upload_url: ${{steps.create_release.outputs.upload_url}} + upload_url: ${{steps.release.outputs.upload_url}} asset_path: ${{env.TGZ}} asset_name: ${{env.TGZ}} asset_content_type: application/x-gzip