Skip to content

Commit 3301560

Browse files
committed
Bump Node to 20 and allow releasing from GH Actions
1 parent 89cf7b8 commit 3301560

File tree

6 files changed

+44
-4
lines changed

6 files changed

+44
-4
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
RUBY_VERSION: 3.0.3
11-
NODE_VERSION: 19.4.0
11+
NODE_VERSION: 20.11.0
1212

1313
jobs:
1414
build-documentation:

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
RUBY_VERSION: 3.0.3
9-
NODE_VERSION: 16.19.0
9+
NODE_VERSION: 20.11.0
1010

1111
jobs:
1212
release:

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Create version packages PR or release
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch: # Allow manual triggering of the workflow
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
id-token: write
15+
steps:
16+
- name: Set tag name
17+
id: set-tag
18+
run: echo "TAG_NAME=${{ github.event.release.tag_name || github.ref_name }}" >> $GITHUB_ENV
19+
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
# Use the tag associated with the release
24+
ref: ${{ env.TAG_NAME }}
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Setup Node from .nvmrc
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version-file: '.nvmrc'
31+
registry-url: 'https://registry.npmjs.org'
32+
33+
- name: Install dependencies
34+
run: yarn install --frozen-lockfile
35+
36+
- name: Publish to NPM
37+
run: npm publish --provenance --access public
38+
env:
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/restyle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
RUBY_VERSION: 3.0.3
11-
NODE_VERSION: 19.1.0
11+
NODE_VERSION: 20.11.0
1212

1313
jobs:
1414
build-ts:

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.11.0

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
2. Run `yarn version` and follow the prompts to choose a version for the package.
55
3. Update the Changelog to place all Next items under the new version.
66
4. Push the changes and new tags to GitHub with `git push origin master --follow-tags`.
7-
5. Publish the release on the internal package registry by triggering a deploy on [Shipit](https://shipit.shopify.io/shopify/restyle).
7+
5. Publish the release on [Github Releases](https://github.com/Shopify/restyle/releases) and the package should be automatically published by Github Actions

0 commit comments

Comments
 (0)