Skip to content

Commit

Permalink
a few more GHA details:
Browse files Browse the repository at this point in the history
- no need for `fetch-depth: 0` when checking out git
- fix GH_TOKEN for `gh` cli to use the built-in ${{ github.token }}
- add `--silent` to `npm pack` to work around npm/cli#7354
  • Loading branch information
dherman committed Apr 15, 2024
1 parent 4ec45b3 commit eb6ac15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions pkgs/create-neon/data/templates/ci/github/build.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ jobs:
uses: actions/checkout@{{versions.actions.checkout}}
with:
ref: {{#$}} inputs.ref {{/$}}
fetch-depth: 0
- name: Setup Neon Environment
id: neon
uses: ./.github/actions/setup
Expand All @@ -104,7 +103,7 @@ jobs:
shell: bash
run: |
mkdir -p dist
echo filename=$(basename $(npm pack ./platforms/{{#$}} matrix.cfg.platform {{/$}} --pack-destination=./dist --json | jq -r '.[0].filename')) | tee -a $GITHUB_OUTPUT
echo filename=$(basename $(npm pack ./platforms/{{#$}} matrix.cfg.platform {{/$}} --silent --pack-destination=./dist --json | jq -r '.[0].filename')) | tee -a $GITHUB_OUTPUT
- name: Release
if: {{#$}} inputs.github-release {{/$}}
uses: softprops/action-gh-release@{{versions.actions.ghRelease}}
Expand All @@ -121,7 +120,6 @@ jobs:
uses: actions/checkout@{{versions.actions.checkout}}
with:
ref: {{#$}} inputs.ref {{/$}}
fetch-depth: 0
- name: Setup Neon Environment
uses: ./.github/actions/setup
with:
Expand All @@ -131,7 +129,7 @@ jobs:
shell: bash
run: |
mkdir -p dist
echo "filename=$(npm pack --pack-destination=./dist)" | tee -a $GITHUB_OUTPUT
echo "filename=$(npm pack --silent --pack-destination=./dist)" | tee -a $GITHUB_OUTPUT
- name: Release
if: {{#$}} inputs.github-release {{/$}}
uses: softprops/action-gh-release@{{versions.actions.ghRelease}}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/create-neon/data/templates/ci/github/comments.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
env:
REPO: {{#$}} github.repository {{/$}}
PR_NO: {{#$}} github.event.issue.number {{/$}}
GITHUB_TOKEN: {{#$}} secrets.GITHUB_TOKEN {{/$}}
GH_TOKEN: {{#$}} github.token {{/$}}

build-all:
name: Build
Expand Down

0 comments on commit eb6ac15

Please sign in to comment.