Skip to content

Commit e9673da

Browse files
committed
ci: ability to release minor explicitly
1 parent 37662ed commit e9673da

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

.github/actions/release/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
npm_token:
1010
description: NPM token
1111
required: true
12+
release_target:
13+
description: Release target (patch, minor)
14+
required: false
15+
default: version-publish
1216

1317
runs:
1418
using: composite
@@ -18,7 +22,7 @@ runs:
1822
NODE_AUTH_TOKEN: ${{ inputs.npm_token }}
1923
GITHUB_TOKEN: ${{ inputs.github_token }}
2024
shell: bash
21-
run: pnpx nx affected --base=last-release --target=version-publish --parallel=1
25+
run: pnpx nx affected --base=last-release --target=${{ inputs.release_target }} --parallel=1
2226

2327
- name: Tag last-release
2428
shell: bash

.github/workflows/release_minor.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
- workflow_dispatch
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node_version: [16]
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Setup
17+
uses: ./.github/actions/setup
18+
with:
19+
node_version: ${{ matrix.node_version }}
20+
21+
- name: Test
22+
uses: ./.github/actions/test
23+
with:
24+
codecov_token: ${{ secrets.CODECOV_TOKEN }}
25+
26+
release:
27+
runs-on: ubuntu-latest
28+
29+
if: github.ref == 'refs/heads/main'
30+
31+
needs: [test]
32+
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: Setup
36+
uses: ./.github/actions/setup
37+
38+
- name: Release
39+
uses: ./.github/actions/release
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
npm_token: ${{ secrets.NPM_TOKEN }}
43+
release_target: ${{ version-publish-minor }}

packages/qwik-nx/project.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@
8080
"postTargets": ["qwik-nx:publish", "qwik-nx:push-to-github"]
8181
}
8282
},
83+
"version-publish-minor": {
84+
"executor": "@jscutlery/semver:version",
85+
"options": {
86+
"noVerify": true,
87+
"push": true,
88+
"releaseAs": "minor",
89+
"postTargets": ["qwik-nx:publish", "qwik-nx:push-to-github"]
90+
}
91+
},
8392
"publish": {
8493
"executor": "ngx-deploy-npm:deploy",
8594
"options": {

0 commit comments

Comments
 (0)