-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.1 KB
/
latest-release.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
name: 'Publish latest release'
on:
release:
types: [released]
jobs:
publish-packages:
name: Publish ${{ matrix.package }} (Latest)
runs-on: ubuntu-latest
strategy:
matrix:
package: [react, vanilla]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 22
registry-url: https://registry.npmjs.org/
cache: 'npm'
- name: Build packages
run: |
npm ci
npm run build-packages
# This step is currently not really necessary, but it will be needed if we use the vanilla package in the react package
- name: Publish package
working-directory: ./packages/${{ matrix.package }}
run: |
CURRENT_VERSION=$(npm view ./ version)
echo "Current version: $CURRENT_VERSION"
RELEASE_VERSION=$CURRENT_VERSION
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
RELEASE_VERSION=$RELEASE_VERSION npm run build
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}