-
-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (44 loc) · 1.4 KB
/
continuous-deployment.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
name: Continuous Delivery
on:
push:
branches:
- main
jobs:
Publish:
name: Publish Next
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Add TypeScript problem matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v20 with Yarn Registry
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
registry-url: https://registry.yarnpkg.com/
- name: Install Dependencies
run: yarn --immutable
- name: Build package
run: yarn build
- name: Bump Version
run: node . --preid "next.$(git rev-parse --verify --short HEAD)" -v --skip-changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Yarnpkg
run: |
yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
yarn config set npmPublishRegistry "https://registry.yarnpkg.com"
yarn npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to GitHub
run: |
yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
yarn config set npmPublishRegistry "https://npm.pkg.github.com"
yarn npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}