-
Notifications
You must be signed in to change notification settings - Fork 16
74 lines (64 loc) · 2.29 KB
/
release-beta.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Release Beta
on:
workflow_dispatch:
push:
branches:
- develop
# Wait for the workflow to finish before starting a new one
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release-beta:
# Only allow on develop branch
if: ${{ github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
# More info: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#adding-permissions-settings
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0
token: ${{ secrets.BCLABUM_GITHUB_TOKEN }}
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Install node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- name: Git config
run: |
git config user.name "bclabum"
git config user.email "blockchain-lab@um.si"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.BCLABUM_PGP }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Set deployment token
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
# Makes a pr to publish the changesets (when merged will publish to npm)
# see https://github.com/changesets/action
- name: Publish To NPM or Create Release Pull Request
uses: martines3000/changeset-action@v1.5.0
id: changesets
with:
version: bash scripts/changesets/version-beta.sh
publish: bash scripts/changesets/publish-beta.sh
title: 'chore: version packages'
commit: 'chore: version packages'
setupGitUser: false
env:
GITHUB_TOKEN: ${{ secrets.BCLABUM_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}