-
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 972 Bytes
/
release.yml
File metadata and controls
41 lines (38 loc) · 972 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
34
35
36
37
38
39
40
41
name: Release
on:
push:
branches:
- main
pull_request_target:
types: [closed]
branches: [main]
jobs:
check_merged:
runs-on: ubuntu-latest
outputs:
merged: ${{ steps.check.outputs.merged }}
steps:
- id: check
run: |
echo "::set-output name=merged::false"
if [[ "${{ github.event.pull_request.merged }}" == "true" ]]; then
echo "::set-output name=merged::true"
fi
release:
needs: check_merged
if: ${{ needs.check_merged.outputs.merged == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
id: checkout
uses: actions/checkout@v5
with:
persist-credentials: false
token: ${{ secrets.PAT }}
- uses: actions/setup-node@v6
with:
node-version: "latest"
- run: npm install
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}