-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (60 loc) · 2.01 KB
/
release.yaml
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
name: Release Packages
on:
push:
branches:
- main
- master
- 'prerelease/*'
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Prepare or Publish
runs-on: ['self-hosted', 'org', 'npm-publish']
permissions:
contents: write
id-token: write
pull-requests: write
repository-projects: write
outputs:
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Akeyless Get Secrets
id: get_auth_token
uses: docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
access-id: p-kf9vjzruht6l
static-secrets: '{"/static-secrets/NPM/npm-publish-token":"NPM_TOKEN"}'
- name: Setup Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: 'enable corepack for yarn'
run: sudo corepack enable yarn
shell: bash
# must call twice because of chicken and egg problem with yarn and node
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
- name: Install Dependencies
shell: bash
run: yarn
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ env.NPM_TOKEN }}
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
version: yarn version-and-reinstall
open-docs-pr:
needs: release
if: ${{ contains(fromJson(needs.release.outputs.publishedPackages).*.name, '@celo/cli') }}
uses: celo-org/developer-tooling/.github/workflows/open-docs-pr.yml@master
with:
commit: ${{ github.sha }}