Skip to content

Commit 319599a

Browse files
author
Rajat
committed
More changes
1 parent cd1af63 commit 319599a

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

.github/workflows/publish-packages.yaml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,32 @@ env:
1515
jobs:
1616
publish-packages:
1717
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
id-token: write
21+
pull-requests: write
1822
steps:
1923
- name: checkout
20-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2125
with:
2226
fetch-depth: 0
2327

28+
- name: Install pnpm
29+
uses: pnpm/action-setup@v4
30+
with:
31+
version: latest
32+
33+
- name: Setup Node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
cache: 'pnpm'
38+
2439
- name: Configure CI Git User
2540
run: |
2641
git config --global user.name 'Rajat Saxena'
2742
git config --global user.email 'hi@sub.rajatsaxena.dev'
28-
git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_PAT@github.com/codelitdev/medialit
29-
env:
30-
GITHUB_PAT: ${{ secrets.PAT }}
31-
32-
- name: Checkout and pull branch
33-
run: git checkout "${GITHUB_REF:11}" && git pull
34-
35-
- name: Install pnpm
36-
run: |
37-
npm i pnpm@latest -g
38-
39-
# - name: Authenticate with Registry
40-
# run: |
41-
# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
42-
# npm whoami
43-
# env:
44-
# NPM_TOKEN: ${{ secrets.NPM }}
43+
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}
4544
4645
- name: Install dependencies
4746
run: pnpm install
@@ -55,7 +54,6 @@ jobs:
5554
publish: pnpm ci:publish
5655
env:
5756
GITHUB_TOKEN: ${{ secrets.PAT }}
58-
NPM_TOKEN: ${{ secrets.NPM }}
5957

6058
- name: Echo changeset output
6159
run: echo "${{ steps.changesets.outputs.hasChangesets }}"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"scripts": {
2020
"prepare": "husky",
21-
"ci:publish": "pnpm publish -r",
21+
"ci:publish": "pnpm publish -r --provenance --no-git-checks",
2222
"test": "pnpm --filter @medialit/api --filter medialit test",
2323
"lint": "eslint --cache --quiet",
2424
"prettier": "prettier --check **/*.{ts,tsx,js,css,md}",

0 commit comments

Comments
 (0)