chore(ci): removed macos-latest from ci
[KDIS.git] / .github / workflows / release.yaml
blobbd878cb2fd831fe12a323c19b7030ccf4e8f4e16
1 name: release
3 on:
4     workflow_run:
5         workflows:
6             - check
7         types:
8             - completed
9         branches:
10             - master
12 concurrency:
13     group: ${{ github.workflow }}-${{ github.ref }}
14     cancel-in-progress: true
16 jobs:
17     release:
18         name: Release package on NPM
19         runs-on: ubuntu-latest
20         if: github.event.workflow_run.conclusion == 'success' && startsWith(github.ref_name, 'v')
21         steps:
22             - name: Checkout
23               uses: actions/checkout@v4
24               with:
25                   fetch-depth: 0
27             - name: Determine if version is prerelease
28               id: prerelease
29               run: |
30                   _prerelease=
31                   if printf "%s\n" "${{ github.ref_name }}" | grep -q -P '^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$'; then
32                     _prerelease=false
33                   else
34                     _prerelease=true
35                   fi
37                   printf 'value=%s\n' "$_prerelease" >> "$GITHUB_OUTPUT"
39             # TODO(carlocorradini) Changelog
41             - name: Release
42               uses: softprops/action-gh-release@v1
43               with:
44                   prerelease: ${{ steps.prerelease.outputs.value == 'true' }}