Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: implement RC workflow #1497

Merged
merged 41 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
765e07c
Revert "feat: add `Predicate.getTransferTxId` helper (#1467)"
danielbate Dec 6, 2023
3a66e7b
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts
danielbate Dec 6, 2023
7327252
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts
danielbate Dec 8, 2023
6fd5197
chore: add rc workflow
danielbate Dec 8, 2023
b976722
chore: changeset
danielbate Dec 8, 2023
763bebd
chore: change rc workflow name
danielbate Dec 8, 2023
6db0f2f
chore: fix rc version
danielbate Dec 8, 2023
7331613
chore: remove workflow dispatch for rc worjflow
danielbate Dec 8, 2023
61cdbe2
Merge branch 'rc/salamander' into db/chore/implement-rc-workflow
arboleya Dec 8, 2023
c6211fc
Merge branch 'rc/salamander' of https://github.com/FuelLabs/fuels-ts …
danielbate Dec 8, 2023
9c6a59b
chore: add correct rc naming
danielbate Dec 8, 2023
6ec1c2e
chore: use correct branch filtering
danielbate Dec 8, 2023
f38ddf2
chore: linting
danielbate Dec 8, 2023
82ede89
chore: alter branch name env
danielbate Dec 8, 2023
afac091
chore: change pull request to push
danielbate Dec 8, 2023
3012b27
Merge branch 'rc/salamander' into db/chore/implement-rc-workflow
arboleya Dec 10, 2023
de29592
Merge branch 'master' of https://github.com/FuelLabs/fuels-ts into db…
danielbate Dec 14, 2023
f2f35d5
feat: set correct rc versiuon in worflow
danielbate Dec 14, 2023
6fb0afb
Merge branch 'rc/salamander' into db/chore/implement-rc-workflow
danielbate Dec 14, 2023
a0a953e
feat: add echo rc verison
danielbate Dec 14, 2023
5fd298d
Merge branch 'db/chore/implement-rc-workflow' of https://github.com/F…
danielbate Dec 14, 2023
0f05dcd
Merge branch 'rc/salamander' into db/chore/implement-rc-workflow
danielbate Dec 14, 2023
116e239
chore: test ci
danielbate Dec 14, 2023
0ec81b7
erge branch 'db/chore/implement-rc-workflow' of https://github.com/Fu…
danielbate Dec 14, 2023
cae7993
chore: test ci
danielbate Dec 14, 2023
e4761e2
chore: echo changesets
danielbate Dec 14, 2023
b4d6ea5
chore: use env in rc changeset
danielbate Dec 14, 2023
d7c4196
test dan release
danielbate Dec 14, 2023
0de979e
chore: enable pr release
danielbate Dec 14, 2023
139c86b
chore: copy pr relase
danielbate Dec 14, 2023
da9b159
try rc nam,e
danielbate Dec 14, 2023
576448a
use salamander
danielbate Dec 14, 2023
f77737a
chore: use rc name
danielbate Dec 14, 2023
d8660a2
use: salamander
danielbate Dec 14, 2023
5d7c931
chore: test salamander
danielbate Dec 14, 2023
5060fc7
chore: fix workflow trigger
danielbate Dec 14, 2023
d14de23
Merge branch 'rc/salamander' into db/chore/implement-rc-workflow
danielbate Dec 14, 2023
02a6120
Merge branch 'rc/salamander' into db/chore/implement-rc-workflow
danielbate Dec 14, 2023
aa93de7
chore: remove env rc name
danielbate Dec 15, 2023
fdb9e68
Merge branch 'db/chore/implement-rc-workflow' of https://github.com/F…
danielbate Dec 15, 2023
608ad9b
chore: update rc suffix
danielbate Dec 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/flat-dodos-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
60 changes: 60 additions & 0 deletions .github/workflows/rc-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release to @rc-<name> tag on npm

on:
push:
branches:
- "rc/*"

jobs:
release-pr:
name: "Release RC to npm"
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- name: CI Setup
uses: ./.github/actions/ci-setup

- name: Ensure NPM access
run: npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Build
run: pnpm build

- name: Get RC name
uses: frabert/replace-string-action@v2
id: rc_name
with:
string: ${{ github.ref }}
pattern: "rc/"
replace-with: ""
arboleya marked this conversation as resolved.
Show resolved Hide resolved

- name: Release to @${{ steps.rc_name.outputs.replaced }} tag on npm
id: release
run: |
echo "${{ steps.rc_name.outputs.replaced }}"
pnpm changeset:next
git add .changeset/fuel-labs-ci.md
pnpm changeset version --snapshot rc-${{ env.RC_NAME }}
danielbate marked this conversation as resolved.
Show resolved Hide resolved
changetsets=$(pnpm changeset publish --tag rc-${{ env.RC_NAME }})
published_version=$(echo "$changetsets" | grep -oP '@\K([0-9]+\.){2}[0-9]+-rc-${{ env.RC_NAME }}-\d+' | head -1)
echo "published_version=$published_version" >> $GITHUB_OUTPUT
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
RC_NAME: ${{ steps.rc_name.outputs.replaced }}

- uses: mshick/add-pr-comment@v2
with:
message: |
This RC is published in NPM with version **rc-${{ steps.rc_name.outputs.replaced }}**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading