-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (26 loc) · 1.02 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
release:
name: Build and release
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: get version
run: 'echo "RELEASE_TAG=v$(jq -r ''.version'' package.json)" >> $GITHUB_ENV'
- run: npm install
- run: npm run build
- 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 release/*.tar.gz release/*.br.tar
- name: update release
run: gh release edit $RELEASE_TAG --draft=false --latest --prerelease=false --notes-file=release/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","inputs":{"run_jobs":"frontend"}}'