Skip to content

Commit d45dbae

Browse files
Update GH actions to use PAT and secrets.
1 parent 3e440f5 commit d45dbae

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/onPushToMain.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
sudo apt-get install -y git-core
3939
git --version
4040
echo "Path is ... $PATH"
41-
git config --global user.email "dishantlangayan@gmail.com"
42-
git config --global user.name "dishantlangayan"
41+
git config --global user.email ${{ secrets.GH_EMAIL }}
42+
git config --global user.name ${{ secrets.GH_USERNAME }}
4343
- name: Generate oclif README
4444
if: ${{ steps.version-check.outputs.skipped == 'false' }}
4545
id: oclif-readme
@@ -59,5 +59,5 @@ jobs:
5959
name: ${{ steps.version-check.outputs.tag }}
6060
tag: ${{ steps.version-check.outputs.tag }}
6161
commit: ${{ github.ref_name }}
62-
token: ${{ secrets.GITHUB_TOKEN }}
62+
token: ${{ secrets.GH_PAT }}
6363
skipIfReleaseExists: true

.github/workflows/onRelease.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@ name: publish
22

33
on:
44
release:
5-
types: [released]
5+
types: [published]
6+
# support manual release in case something goes wrong and needs to be repeated or tested
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: tag that needs to publish
11+
type: string
12+
required: true
13+
14+
permissions:
15+
id-token: write # Required for OIDC
16+
contents: read
617

718
jobs:
819
publish:
@@ -16,7 +27,5 @@ jobs:
1627
- run: npm install
1728
- run: npm run build
1829
- run: npm run prepack
19-
- uses: JS-DevTools/npm-publish@v3
20-
with:
21-
token: ${{ secrets.NPM_TOKEN }}
30+
- run: npm publish --access public
2231
- run: npm run postpack

0 commit comments

Comments
 (0)