Skip to content

Commit

Permalink
Add release workflow (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Feb 4, 2022
1 parent 10666ab commit 091c6ff
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 091c6ff

Please sign in to comment.