Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions .github/workflows/publish-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,32 @@ env:
jobs:
publish-packages:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Configure CI Git User
run: |
git config --global user.name 'Rajat Saxena'
git config --global user.email 'hi@sub.rajatsaxena.dev'
git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_PAT@github.com/codelitdev/medialit
env:
GITHUB_PAT: ${{ secrets.PAT }}

- name: Checkout and pull branch
run: git checkout "${GITHUB_REF:11}" && git pull

- name: Install pnpm
run: |
npm i pnpm@latest -g

# - name: Authenticate with Registry
# run: |
# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
# npm whoami
# env:
# NPM_TOKEN: ${{ secrets.NPM }}
git remote set-url origin https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}

- name: Install dependencies
run: pnpm install
Expand All @@ -55,7 +54,6 @@ jobs:
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
NPM_TOKEN: ${{ secrets.NPM }}

- name: Echo changeset output
run: echo "${{ steps.changesets.outputs.hasChangesets }}"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"scripts": {
"prepare": "husky",
"ci:publish": "pnpm publish -r",
"ci:publish": "pnpm publish -r --provenance --no-git-checks",
"test": "pnpm --filter @medialit/api --filter medialit test",
"lint": "eslint --cache --quiet",
"prettier": "prettier --check **/*.{ts,tsx,js,css,md}",
Expand Down
Loading