Skip to content

Commit a215b06

Browse files
Revert "disable canary publish (#4492)" (#4499)
This reverts commit ac3c6c0.
1 parent c8abc92 commit a215b06

File tree

1 file changed

+60
-60
lines changed

1 file changed

+60
-60
lines changed
Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
# name: Canary Release
2-
# on:
3-
# push:
4-
# branches-ignore:
5-
# - 'main'
6-
# - 'next-major'
7-
# - 'changeset-release/**'
1+
name: Canary Release
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'main'
6+
- 'next-major'
7+
- 'changeset-release/**'
88

9-
# concurrency:
10-
# group: ${{ github.workflow }}-${{ github.ref }}
11-
# cancel-in-progress: true
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
1212

13-
# jobs:
14-
# release:
15-
# concurrency:
16-
# group: npm-canary
17-
# cancel-in-progress: false
18-
# runs-on: ubuntu-latest
19-
# steps:
20-
# - name: Checkout repository
21-
# uses: actions/checkout@v4
22-
# with:
23-
# # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
24-
# fetch-depth: 0
25-
# - name: Set up Node
26-
# uses: actions/setup-node@v4
27-
# with:
28-
# node-version: 20
29-
# cache: 'npm'
30-
# - run: npm i -g npm@^10.5.1
31-
# - name: Install dependencies
32-
# run: npm ci
33-
# - name: Build
34-
# run: npm run build --if-present
35-
# - name: Create .npmrc
36-
# run: |
37-
# cat << EOF > "$HOME/.npmrc"
38-
# //registry.npmjs.org/:_authToken=$NPM_TOKEN
39-
# EOF
40-
# env:
41-
# NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
42-
# - name: Publish canary release
43-
# run: |
44-
# echo -e "---\n$( jq .name packages/react/package.json ): patch\n---\n\nFake entry to force publishing" > .changeset/force-snapshot-release.md
45-
# npx changeset version --snapshot
46-
# npx changeset publish --tag canary
47-
# env:
48-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
# - name: Output canary version
50-
# uses: actions/[email protected]
51-
# with:
52-
# script: |
53-
# const package = require(`${process.env.GITHUB_WORKSPACE}/packages/react/package.json`)
54-
# github.repos.createCommitStatus({
55-
# owner: context.repo.owner,
56-
# repo: context.repo.repo,
57-
# sha: context.sha,
58-
# state: 'success',
59-
# context: `Published ${package.name}`,
60-
# description: package.version,
61-
# target_url: `https://unpkg.com/${package.name}@${package.version}/`
62-
# })
13+
jobs:
14+
release:
15+
concurrency:
16+
group: npm-canary
17+
cancel-in-progress: false
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
24+
fetch-depth: 0
25+
- name: Set up Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: 'npm'
30+
- run: npm i -g npm@^10.5.1
31+
- name: Install dependencies
32+
run: npm ci
33+
- name: Build
34+
run: npm run build --if-present
35+
- name: Create .npmrc
36+
run: |
37+
cat << EOF > "$HOME/.npmrc"
38+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
39+
EOF
40+
env:
41+
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
42+
- name: Publish canary release
43+
run: |
44+
echo -e "---\n$( jq .name packages/react/package.json ): patch\n---\n\nFake entry to force publishing" > .changeset/force-snapshot-release.md
45+
npx changeset version --snapshot
46+
npx changeset publish --tag canary
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
- name: Output canary version
50+
uses: actions/[email protected]
51+
with:
52+
script: |
53+
const package = require(`${process.env.GITHUB_WORKSPACE}/packages/react/package.json`)
54+
github.repos.createCommitStatus({
55+
owner: context.repo.owner,
56+
repo: context.repo.repo,
57+
sha: context.sha,
58+
state: 'success',
59+
context: `Published ${package.name}`,
60+
description: package.version,
61+
target_url: `https://unpkg.com/${package.name}@${package.version}/`
62+
})

0 commit comments

Comments
 (0)