@@ -14,7 +14,8 @@ name: Turborepo Release
14
14
15
15
env :
16
16
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?
18
19
19
20
on :
20
21
workflow_dispatch :
37
38
type : boolean
38
39
39
40
jobs :
40
- bump-version :
41
+ stage :
41
42
runs-on : ubuntu-latest
42
43
steps :
43
44
- uses : actions/checkout@v3
@@ -51,15 +52,25 @@ jobs:
51
52
- name : Version
52
53
run : |
53
54
./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 }}"
55
61
outputs :
56
- version : " ${{ steps.bump-version .outputs.VERSION }}"
62
+ stage-branch : " ${{ steps.stage .outputs.STAGE_BRANCH }}"
57
63
58
64
rust-smoke-test :
59
65
name : Rust Unit Tests
60
66
runs-on : ubuntu-latest
61
- needs : [bump-version ]
67
+ needs : [stage ]
62
68
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 }}
63
74
- name : Setup Turborepo Environment
64
75
uses : ./.github/actions/setup-turborepo-environment
65
76
with :
71
82
js-smoke-test :
72
83
name : JS Package Tests
73
84
runs-on : ubuntu-latest
74
- needs : [bump-version ]
85
+ needs : [stage ]
75
86
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 }}
76
92
- name : Setup Turborepo Environment
77
93
uses : ./.github/actions/setup-turborepo-environment
78
94
with :
@@ -82,23 +98,25 @@ jobs:
82
98
uses : ./.github/actions/install-global-turbo
83
99
- name : Run JS Package Tests
84
100
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]
91
105
runs-on : ubuntu-latest
92
106
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
+
97
110
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 }}
101
118
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