-
Notifications
You must be signed in to change notification settings - Fork 23
46 lines (38 loc) · 1.1 KB
/
publish.yml
File metadata and controls
46 lines (38 loc) · 1.1 KB
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
name: PUBLISH
run-name: 🚀 Commit on ${{ github.ref_name }}
on:
push:
branches:
- master
jobs:
validate:
name: ↪️ Validate
uses: ./.github/workflows/validate.yml
publish:
name: 📦 Publish
needs: validate
runs-on: ubuntu-latest
permissions:
packages: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: 📁 Checkout code
uses: actions/checkout@v4
- name: ⚙️ Setup node
uses: actions/setup-node@v3
with:
node-version: '18.20'
cache: 'yarn'
- name: 📦 Install dependencies
run: yarn install --frozen-lockfile
- name: ❓ Check if a new version needs to be published
id: publish-check
continue-on-error: true
run: yarn publish:check
- name: 🆙 Bump version, tag commit, publish GitHub Release
if: ${{ steps.publish-check.outcome == 'success' }}
run: yarn publish:github
- name: 🐋 Publish Docker image
if: ${{ steps.publish-check.outcome == 'success' }}
run: yarn publish:docker