From e26c4dd368697215592a73853b9b3bb8defe4249 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 27 Feb 2021 15:59:15 +0000 Subject: [PATCH] Update CI pipeline --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5656bdf..61358de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,3 +21,26 @@ jobs: with: name: "OpenRCT2 DevTools" path: out/devtools.min.js + - name: Get the version + if: startsWith(github.ref, 'refs/tags/v') + run: echo "version=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV + - name: Create release + id: create_release + uses: actions/create-release@v1 + if: startsWith(github.ref, 'refs/tags/v') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ env.version }} + release_name: Release v${{ env.version }} + prerelease: false + - name: Upload Release Asset + uses: actions/upload-release-asset@v1.0.2 + if: startsWith(github.ref, 'refs/tags/v') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: out/devtools.min.js + asset_name: devtools.min.js + asset_content_type: text/javascript