Release #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release frontend | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
# schedule: | |
# - cron: "10 3 * * 1" | |
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 build | |
- run: npm run dist | |
- name: create release if needed | |
run: gh release view $RELEASE_TAG || gh release create $RELEASE_TAG | |
- name: add files to release | |
run: gh release upload $RELEASE_TAG --clobber dist/*.tar.gz dist/*.br.tar | |
- name: update release | |
run: gh release edit $RELEASE_TAG --draft=false --latest --prerelease=false --notes-file=dist/notes.md | |
- name: trigger docker release | |
run: 'curl -XPOST -u "michaelkreil:${{secrets.PAT_TOKEN}}" https://api.github.com/repos/versatiles-org/versatiles-docker/actions/workflows/release.yml/dispatches --data ''{"ref":"main"}''' |