Skip to content

Release

Release #20

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
release:
name: Build and release
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v3
- name: get version
run: 'echo "RELEASE_TAG=v$(jq -r ''.version'' package.json)" >> $GITHUB_ENV'
- run: npm install
- run: npm run release
- name: create release if needed
run: gh release view $RELEASE_TAG || gh release create $RELEASE_TAG --draft --prerelease
- name: upload file to release
run: gh release upload $RELEASE_TAG *.gz *.js *.json --clobber
working-directory: ./dist
- name: update release
run: gh release edit $RELEASE_TAG --draft=false --latest --prerelease=false
# - name: trigger frontend release
# run: 'curl -XPOST -u "michaelkreil:${{secrets.PAT_TOKEN}}" https://api.github.com/repos/versatiles-org/versatiles-frontend/actions/workflows/release.yml/dispatches --data ''{"ref":"main"}'''