Skip to content

Commit 18bdae8

Browse files
petertonysmith94mchristopherarboleya
authored
chore: migrate release (#3642)
* chore: add environment * chore: comment out cross-repo requirements * fix: correct env var name --------- Co-authored-by: Mike Christopher <[email protected]> Co-authored-by: Anderson Arboleya <[email protected]>
1 parent 45cc32e commit 18bdae8

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

.github/workflows/release.yaml

+21-18
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
release:
1313
name: "Release"
1414
runs-on: ubuntu-latest
15+
environment: npm-deploy
1516
permissions: write-all
1617
# Ensure that the workflow runs only after a commit is pushed into the branch
1718
# and not when the branch is created.
@@ -42,7 +43,7 @@ jobs:
4243
- name: Ensure NPM access
4344
run: npm whoami
4445
env:
45-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
NODE_AUTH_TOKEN: ${{ secrets.NPM_DEPLOY_TOKEN }}
4647

4748
- name: Build
4849
run: pnpm build
@@ -74,7 +75,7 @@ jobs:
7475
githubTagName: ${{ env.RELEASE_VERSION }}
7576
env:
7677
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
78+
NODE_AUTH_TOKEN: ${{ secrets.NPM_DEPLOY_TOKEN }}
7879

7980
- name: Prettify changelog
8081
run: pnpm changeset:update-changelog
@@ -108,7 +109,7 @@ jobs:
108109
pnpm changeset version --snapshot next
109110
pnpm changeset publish --tag next
110111
env:
111-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
112+
NODE_AUTH_TOKEN: ${{ secrets.NPM_DEPLOY_TOKEN }}
112113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113114

114115
# ensure docs are always deployed after merge of changeset PR
@@ -119,14 +120,15 @@ jobs:
119120
if: startsWith(env.LAST_COMMIT_MSG, 'ci(release):') && env.RELEASE_VERSION_HIGHER_THAN_LATEST == 'true'
120121
run: echo SHOULD_DEPLOY_DOCS=true >> $GITHUB_ENV
121122

122-
- name: Update docs (nightly)
123-
if: github.ref_name == 'master' && env.SHOULD_DEPLOY_DOCS == 'true'
124-
uses: benc-uk/workflow-dispatch@v1
125-
with:
126-
workflow: update-nightly.yml
127-
ref: master
128-
repo: FuelLabs/docs-hub
129-
token: ${{ secrets.GITHUB_TOKEN }}
123+
# # Commenting out as we require permissions to trigger across repos
124+
# - name: Update docs (nightly)
125+
# if: github.ref_name == 'master' && env.SHOULD_DEPLOY_DOCS == 'true'
126+
# uses: benc-uk/workflow-dispatch@v1
127+
# with:
128+
# workflow: update-nightly.yml
129+
# ref: master
130+
# repo: FuelLabs/docs-hub
131+
# token: ${{ secrets.GITHUB_TOKEN }}
130132

131133
- name: Create PR to apply latest release to master
132134
if: steps.changesets.outputs.published == 'true' && startsWith(github.ref_name, 'release/') && env.RELEASE_VERSION_HIGHER_THAN_LATEST == 'true'
@@ -178,10 +180,11 @@ jobs:
178180
env:
179181
S3_CDN_BUCKET: ${{ secrets.S3_CDN_BUCKET }}
180182

181-
- name: Notify migrations and disclosures of the new release (breaking changes)
182-
run: |
183-
curl -X POST \
184-
-H "Accept: application/vnd.github.v3+json" \
185-
-H "Authorization: token ${{ secrets.MIGRATIONS_RELEASE_TRIGGER_TOKEN }}" \
186-
https://api.github.com/repos/FuelLabs/migrations-and-disclosures/dispatches \
187-
-d '{"event_type":"update_versions"}'
183+
# # Commenting out as we require permissions to trigger across repos
184+
# - name: Notify migrations and disclosures of the new release (breaking changes)
185+
# run: |
186+
# curl -X POST \
187+
# -H "Accept: application/vnd.github.v3+json" \
188+
# -H "Authorization: token ${{ secrets.MIGRATIONS_RELEASE_TRIGGER_TOKEN }}" \
189+
# https://api.github.com/repos/FuelLabs/migrations-and-disclosures/dispatches \
190+
# -d '{"event_type":"update_versions"}'

0 commit comments

Comments
 (0)