Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
btlghrants committed Aug 27, 2024
1 parent 2a72e73 commit 9334bcb
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 16 deletions.
60 changes: 50 additions & 10 deletions .github/workflows/semrel-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,73 @@ on:
workflow_call: # can be triggered by other workflows

jobs:
version:
# - name: upload image tar artifact
# uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
# with:
# name: pepr-img.tar
# path: pepr-img.tar
# retention-days: 1

# - name: dowload image tar artifact
# uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
# with:
# name: pepr-img.tar
# path: ${{ github.workspace }}

check:
name: Check for Releasable Updates
runs-on: ubuntu-latest
permissions: write-all
# permissions:
# contents: write
permissions:
contents: read
steps:
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: npm

- name: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm ci
npm run sem-rel -- --dry-run | grep --invert-match --quiet \
"There are no relevant changes, so no new version is released."
build:
needs: [check]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Use Node.js 20
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: npm

- name: semantic-release
- uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1

- name: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm ci
npm run semantic-release
npm run sem-rel -- --dry-run
# build:
# runs-on: ubuntu-latest
Expand Down
6 changes: 1 addition & 5 deletions releaserc.json → .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm", {
"npmPublish": false
}
],
[ "@semantic-release/npm", { "npmPublish": false } ],
"@semantic-release/github"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"test:journey:upgrade": "npm run test:journey:k3d && npm run test:journey:image && jest --detectOpenHandles journey/pepr-upgrade.test.ts",
"format:check": "eslint src && prettier src --check",
"format:fix": "eslint src --fix && prettier src --write",
"semantic-release": "semantic-release --dry-run"
"sem-rel": "semantic-release"
},
"release": {
"branches": [
Expand Down

0 comments on commit 9334bcb

Please sign in to comment.