Skip to content

Commit 0e79758

Browse files
committed
Require a Personal Access Token
Signed-off-by: Willem Pienaar <[email protected]>
1 parent 9617567 commit 0e79758

1 file changed

Lines changed: 23 additions & 16 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,34 @@ on:
66
dry_run:
77
description: 'Dry Run'
88
required: true
9-
default: true
9+
default: 'true'
1010
type: boolean
11+
token:
12+
description: 'Personal Access Token'
13+
required: true
14+
default: ""
15+
type: string
1116

1217
jobs:
1318
release:
1419
name: release
1520
runs-on: ubuntu-latest
1621
env:
17-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
GITHUB_TOKEN: ${{ github.event.inputs.token }}
1823
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v2
21-
- name: Setup Node.js
22-
uses: actions/setup-node@v2
23-
with:
24-
node-version: '16'
25-
- name: Release (Dry Run)
26-
if: github.event.inputs.dry_run == 'true'
27-
run: |
28-
npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release --dry-run
29-
- name: Release
30-
if: github.event.inputs.dry_run == 'false'
31-
run: |
32-
npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
with:
27+
persist-credentials: false
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v2
30+
with:
31+
node-version: '16'
32+
- name: Release (Dry Run)
33+
if: github.event.inputs.dry_run == 'true'
34+
run: |
35+
npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release --dry-run
36+
- name: Release
37+
if: github.event.inputs.dry_run == 'false'
38+
run: |
39+
npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release

0 commit comments

Comments
 (0)