From 091c6ff39194d40607d651bc9aa24ea93f00b60a Mon Sep 17 00:00:00 2001 From: Stefan Peters Date: Fri, 4 Feb 2022 11:41:49 +0100 Subject: [PATCH] Add release workflow (#661) --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d8f4dba8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +# This workflow will create a GitHub release with a zip attachment + +name: Release + +on: + push: + tags: + - "*.*.*" + +jobs: + github-release: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: ./.github/actions/build + - name: Create zip file for release + run: | + mv dist cocoda + zip -r "cocoda-$(git describe --tags).zip" cocoda + - name: Set artifact name + run: | + echo "ARTIFACT_NAME=$(ls cocoda-*.zip)" >> $GITHUB_ENV + - name: Create GitHub release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Cocoda ${{ github.ref }} + body: TODO + draft: true + prerelease: false + - uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./${{ env.ARTIFACT_NAME }} + asset_name: ${{ env.ARTIFACT_NAME }} + asset_content_type: application/zip