From 44a18784463015d618ab31c53eeb5bf477c5fa10 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Sun, 2 Jun 2024 18:07:50 -0400 Subject: [PATCH 1/2] Fix workflow permissions --- .github/workflows/release.yml | 23 ++++++++--------------- .github/workflows/sync-master.yml | 15 +++++++++++++-- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04c5665..03d6428 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/sync-master.yml b/.github/workflows/sync-master.yml index 9d8d50c..c492542 100644 --- a/.github/workflows/sync-master.yml +++ b/.github/workflows/sync-master.yml @@ -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 +# ``` From bc380c71e00dcf8a7ab7b9589a5cc0807c182b71 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Sun, 2 Jun 2024 18:14:02 -0400 Subject: [PATCH 2/2] Add editorconfig to appease shfmt --- .editorconfig | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5e41726 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +# https://EditorConfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_size = 2 +indent_style = space