Skip to content

Commit

Permalink
updates github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kruschid committed Dec 30, 2024
1 parent 5ad2e6d commit a808405
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 42 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build & Test & Maybe Publish
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
release:
types: [ published ]
jobs:
build_and_maybe_publish:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: "https://registry.npmjs.org"
- name: Build & Test
run: |
yarn install --frozen-lockfile
yarn build
- name: prerelease
if: github.event_name == 'release' && github.event.release.prerelease
run: npm publish --tag dev
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: publish
if: github.event_name == 'release' && !github.event.release.prerelease
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

20 changes: 0 additions & 20 deletions .github/workflows/on_prereleased.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/on_released.yml

This file was deleted.

0 comments on commit a808405

Please sign in to comment.