Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbhmr committed Apr 11, 2024
1 parent c9d181b commit ce14488
Show file tree
Hide file tree
Showing 7 changed files with 777 additions and 204 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/gh-release-create.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/npm-generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: npm generate
on:
push:
branches: "main"
paths-ignore:
- README.md
- LICENSE
- .gitignore
- .github/**
- "!.github/workflows/npm-generate.yml"
schedule:
- cron: "41 */6 * * *"
workflow_dispatch:
concurrency: ${{ github.workflow }}
jobs:
npm-generate:
permissions:
contents: write
outputs:
pushed: ${{ steps.add-commit-push.outputs.pushed }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: npm
- run: npm ci
- run: npm run generate
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm test
- id: add-commit-push
uses: actions4git/add-commit-push@v1
npm-publish:
needs: npm-generate
if: needs.npm-generate.outputs.pushed
permissions:
contents: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: npm
registry-url: https://registry.npmjs.org/
- shell: bash
run: |
version=$(jq -r .version package.json)
gh release create "v$version" --generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
release:
types: released
workflow_dispatch:
workflow_call:
concurrency: ${{ github.workflow }}
jobs:
npm-publish:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- README.md
- .github/**
- "!.github/workflows/npm-test.yml"
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
Loading

0 comments on commit ce14488

Please sign in to comment.