Skip to content

Commit

Permalink
ci: add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ookkoouu committed Nov 30, 2024
1 parent 55398d5 commit 2bd0435
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
21 changes: 21 additions & 0 deletions .github/workflows/manual-pub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Manually Publish

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version: 22
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check Relese & Publish

on:
push:
branches:
- main

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
do_publish: ${{ steps.release.outputs.release_created }}
permissions:
contents: write
pull-requests: write
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node

publish:
if: ${{ needs.release-please.outputs.do_publish }}
needs: release-please
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version: 22
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test
on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version: 22
- run: npm ci
- run: npm run test

0 comments on commit 2bd0435

Please sign in to comment.