Skip to content

Commit 4710d65

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

File tree

6 files changed

+51
-4
lines changed

6 files changed

+51
-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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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: Set tag name
24+
id: set-tag
25+
run: echo "TAG_NAME=${{ github.event.release.tag_name || github.event.inputs.tag }}" >> $GITHUB_ENV
26+
27+
- name: Checkout Repo
28+
uses: actions/checkout@v3
29+
with:
30+
token: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }}
31+
# Use the tag associated with the release
32+
ref: ${{ env.TAG_NAME }}
33+
34+
- name: Setup Node from .nvmrc
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version-file: '.nvmrc'
38+
39+
- name: Install dependencies
40+
run: yarn install --frozen-lockfile
41+
42+
- name: Publish to NPM
43+
run: npm publish --provenance --tag ${{ env.TAG_NAME }}
44+
env:
45+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
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)