Skip to content

Commit

Permalink
Publish updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tajo committed Jul 6, 2023
1 parent 4cf37be commit b185549
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ env:

jobs:
build:
name: Build
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v2
Expand Down Expand Up @@ -60,5 +60,5 @@ jobs:
run: |
./scripts/bump-all.sh
env:
GH_TOKEN: ${{ secrets.MY_GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 2 additions & 5 deletions scripts/bump-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ if [[ "$commit_message" == "Bump npm swc-plugin-fusion" ]]; then
exit 0
fi

git config --local --unset-all credential.helper
git remote remove origin
git remote add origin https://${GH_TOKEN}@github.com/tajo/swc-plugin-fusion.git

echo "Setting git user.name and user.email to last commit author"
git config --global user.name "$(git log -n 1 --pretty=format:%an)"
git config --global user.email "$(git log -n 1 --pretty=format:%ae)"
Expand All @@ -24,5 +20,6 @@ git add .
git commit -m "Bump npm swc-plugin-fusion"
git push origin main
git push origin main --tags
npm publish --workspaces
cd ./packages/fusion
npm publish

0 comments on commit b185549

Please sign in to comment.