Skip to content

Commit 94f3c65

Browse files
committed
Merge branch 'dev' into releases/v4
2 parents 630bbaf + 1b7e169 commit 94f3c65

File tree

3 files changed

+55
-90
lines changed

3 files changed

+55
-90
lines changed

.github/workflows/codeql-analysis.yml

-31
This file was deleted.

.github/workflows/publish.yml

-58
This file was deleted.

.github/workflows/version.yml

+55-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Update Major Version Tag 🏷️
1+
name: Update Major Version Tag and Publish to Registry 📦
22

33
on:
44
push:
@@ -11,3 +11,57 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: nowactions/[email protected]
14+
15+
update-registries:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
ref: dev
21+
22+
# Setup .npmrc file to publish to npm
23+
- uses: actions/setup-node@v4
24+
with:
25+
node-version-file: '.nvmrc'
26+
registry-url: 'https://registry.npmjs.org'
27+
scope: '@jamesives'
28+
29+
- name: Configure Git
30+
run: |
31+
git config user.email "[email protected]"
32+
git config user.name "James Ives"
33+
34+
- name: Install Yarn
35+
run: npm install -g yarn
36+
37+
- run: yarn install --frozen-lockfile
38+
- run: yarn build
39+
- run: git stash
40+
- name: Set version to match the tag
41+
run: |
42+
VERSION=${GITHUB_REF#refs/tags/v}
43+
npm version $VERSION -m "Release $VERSION 📣"
44+
env:
45+
GITHUB_REF: ${{ github.ref }}
46+
- run: git push
47+
48+
# Publish to npm
49+
- run: npm publish --access public
50+
env:
51+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
53+
# Setup .npmrc file to publish to GitHub Packages
54+
- uses: actions/setup-node@v4
55+
with:
56+
node-version-file: '.nvmrc'
57+
registry-url: 'https://npm.pkg.github.com'
58+
scope: '@jamesives'
59+
60+
- name: Authenticate with the GitHub Package Registry
61+
run: |
62+
echo "//npm.pkg.github.com:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
63+
64+
# Publish to GitHub Packages
65+
- run: npm publish
66+
env:
67+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)