Skip to content

Commit

Permalink
Fix workflow permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkarns committed Jun 2, 2024
1 parent f8b6fc4 commit 44a1878
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
name: Release
on:
push: { tags: "v*.*.*" }
push: { tags: "v[0-9]+.[0-9]+.[0-9]+*" }
workflow_dispatch:
permissions: {contents: read}

jobs:
github:
uses: nodenv/.github/.github/workflows/release.yml@v1

npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
scope: '@nodenv'
registry-url: 'https://registry.npmjs.org'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
release:
permissions: {contents: write}
uses: nodenv/.github/.github/workflows/release.yml@v4
with:
homebrew: false
15 changes: 13 additions & 2 deletions .github/workflows/sync-master.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
name: Sync Master
name: Sync Default Branch
on:
push: { branches: main }
workflow_dispatch:
permissions: {contents: read}

jobs:
sync:
uses: nodenv/.github/.github/workflows/sync-master.yml@v1
permissions: {contents: write}
uses: nodenv/.github/.github/workflows/sync-master.yml@v4

# One-time commands for users to switch-over:
#
# ```console
# git branch -m master main
# git fetch origin
# git branch -u origin/main main
# git remote set-head origin -a
# ```

0 comments on commit 44a1878

Please sign in to comment.