-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (27 loc) · 843 Bytes
/
release.yml
File metadata and controls
33 lines (27 loc) · 843 Bytes
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
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
release:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- run: |
NPM_TAG='latest'
IS_PRERELEASE=false
if [[ $GITHUB_REF_NAME =~ 'alpha' || $GITHUB_REF_NAME =~ 'beta' || $GITHUB_REF_NAME =~ 'rc' ]]; then
NPM_TAG='next'
IS_PRERELEASE=true
fi
echo "IS_PRERELEASE=$IS_PRERELEASE" >> $GITHUB_ENV
- uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref }}
name: v${{ github.ref_name }}
body: Please refer to [CHANGELOG.md](https://github.com/studiometa/wp-toolkit/blob/${{ github.ref_name }}/CHANGELOG.md) for details.
draft: false
prerelease: ${{ env.IS_PRERELEASE }}