-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.16 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Release
permissions:
actions: write
contents: write
on:
workflow_run:
workflows: ['test']
branches: release
types:
- completed
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: 🚀 Release
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment: Release
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 18.17.x
- name: 📥 Download deps
run: yarn install --frozen-lockfile
- name: Create Release Pull Request or Publish to Npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Send a Telegram notification if a publish happens
# if: steps.changesets.outputs.published == 'true'
# uses: appleboy/telegram-action@master