Skip to content

Commit 8b4b4fd

Browse files
committed
Reverting turborepo release
1 parent a7de080 commit 8b4b4fd

File tree

1 file changed

+40
-22
lines changed

1 file changed

+40
-22
lines changed

.github/workflows/turborepo-release.yml

+40-22
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ name: Turborepo Release
1414

1515
env:
1616
CARGO_PROFILE_RELEASE_LTO: true
17-
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
17+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
18+
RELEASE_TURBO_CLI: true # TODO: do we need this?
1819

1920
on:
2021
workflow_dispatch:
@@ -37,7 +38,7 @@ on:
3738
type: boolean
3839

3940
jobs:
40-
bump-version:
41+
stage:
4142
runs-on: ubuntu-latest
4243
steps:
4344
- uses: actions/checkout@v3
@@ -51,15 +52,25 @@ jobs:
5152
- name: Version
5253
run: |
5354
./scripts/version.js ${{ inputs.increment }}
54-
echo "VERSION=$(cat version.txt)" >> $GITHUB_OUTPUT
55+
cat version.txt
56+
- name: Stage Commit
57+
id: stage
58+
run: cd cli && make stage-release && echo "STAGE_BRANCH=$(git branch --show-current)" >> $GITHUB_OUTPUT
59+
- name: Show Stage Commit
60+
run: echo "${{ steps.stage.outputs.STAGE_BRANCH }}"
5561
outputs:
56-
version: "${{ steps.bump-version.outputs.VERSION }}"
62+
stage-branch: "${{ steps.stage.outputs.STAGE_BRANCH }}"
5763

5864
rust-smoke-test:
5965
name: Rust Unit Tests
6066
runs-on: ubuntu-latest
61-
needs: [bump-version]
67+
needs: [stage]
6268
steps:
69+
- name: Show Stage Commit
70+
run: echo "${{ needs.stage.outputs.stage-branch }}"
71+
- uses: actions/checkout@v3
72+
with:
73+
ref: ${{ needs.stage.outputs.stage-branch }}
6374
- name: Setup Turborepo Environment
6475
uses: ./.github/actions/setup-turborepo-environment
6576
with:
@@ -71,8 +82,13 @@ jobs:
7182
js-smoke-test:
7283
name: JS Package Tests
7384
runs-on: ubuntu-latest
74-
needs: [bump-version]
85+
needs: [stage]
7586
steps:
87+
- name: Show Stage Commit
88+
run: echo "${{ needs.stage.outputs.stage-branch }}"
89+
- uses: actions/checkout@v3
90+
with:
91+
ref: ${{ needs.stage.outputs.stage-branch }}
7692
- name: Setup Turborepo Environment
7793
uses: ./.github/actions/setup-turborepo-environment
7894
with:
@@ -82,23 +98,25 @@ jobs:
8298
uses: ./.github/actions/install-global-turbo
8399
- name: Run JS Package Tests
84100
run: turbo run check-types test --filter="./packages/*" --color
85-
make-release-pr:
86-
needs: [bump-version, rust-smoke-test, js-smoke-test]
87-
permissions:
88-
id-token: write # Enable OIDC
89-
pull-requests: write
90-
contents: write
101+
102+
create-release-pr:
103+
name: "Open Release Branch PR"
104+
needs: [stage, npm-publish]
91105
runs-on: ubuntu-latest
92106
steps:
93-
- uses: actions/checkout@v3
94-
- uses: chainguard-dev/actions/setup-gitsign@main
95-
- name: Install cargo-release
96-
uses: taiki-e/install-action@v1
107+
- name: Show Stage Commit
108+
run: echo "${{ needs.stage.outputs.stage-branch }}"
109+
- uses: actions/[email protected]
97110
with:
98-
tool: cargo-release
99-
100-
- uses: cargo-bins/release-pr@v2
111+
ref: ${{ needs.stage.outputs.stage-branch }}
112+
- name: Get version
113+
id: getVersion
114+
run: echo "version=$(head -n 1 version.txt)" >> $GITHUB_OUTPUT
115+
- name: Create pull request
116+
uses: thomaseizinger/create-pull-request@master
117+
if: ${{ !inputs.dry_run }}
101118
with:
102-
github-token: ${{ secrets.GITHUB_TOKEN }}
103-
version: ${{ needs.bump-version.outputs.version }}
104-
crate-name: turbo
119+
github_token: ${{ secrets.GITHUB_TOKEN }}
120+
head: ${{ needs.stage.outputs.stage-branch }}
121+
base: main
122+
title: "release(turborepo): ${{ steps.getVersion.outputs.version }}"

0 commit comments

Comments
 (0)