-
Notifications
You must be signed in to change notification settings - Fork 3.2k
43 lines (37 loc) · 1.19 KB
/
release-snapshot.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
name: Release snapshot
# Releases a snapshot release when new commits merge to develop
# This ensures the release process is working as expected as well as always gives us a release
# we should move to a single branch in near future
on:
workflow_dispatch:
push:
branches:
- develop
jobs:
snapshot-snapshot:
name: Publish snapshot release to npm
if: github.repository == 'ethereum-optimism/optimism'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Set deployment token
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Verify NPM Token is valid
run: npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish snapshots
uses: seek-oss/changesets-snapshot@v0
with:
pre-publish: pnpm nx run-many --target=build --skip-nx-cache
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}