Skip to content

Commit ea542dc

Browse files
committed
Bump Node to 20 and allow releasing from GH Actions
1 parent 5fbb3f4 commit ea542dc

File tree

6 files changed

+47
-4
lines changed

6 files changed

+47
-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: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
inputs:
8+
tag:
9+
description: 'Tag to release'
10+
required: true
11+
12+
concurrency: ${{ github.workflow }}-${{ github.ref }}
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
id-token: write
22+
steps:
23+
- name: Checkout Repo
24+
uses: actions/checkout@v3
25+
with:
26+
token: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
27+
# Use the tag associated with the release
28+
ref: ${{ github.event.release.tag_name || github.event.inputs.tag }}
29+
30+
- name: Setup Node from .nvmrc
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version-file: '.nvmrc'
34+
35+
- name: Install dependencies
36+
run: yarn install --frozen-lockfile
37+
38+
- name: Publish to NPM
39+
run: npm publish --provenance --tag --latest
40+
env:
41+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
GITHUB_TOKEN: ${{ secrets.SHOPIFY_GH_ACCESS_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)