Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak workflows #78

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Preview docs
on:
pull_request:
branches: production
branches: 'main'
paths:
- docs/**
- '*rc'
Expand All @@ -10,7 +10,7 @@ on:
- '*.lock'
- .github/workflows/preview-docs.yml
concurrency:
group: ${{ github.workflow }}
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
preview-docs:
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Publish npm
on:
release:
types: [published, prereleased]
types: published
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
concurrency: ${{ github.workflow }}
jobs:
publish-npm:
runs-on: ubuntu-latest
Expand All @@ -17,12 +15,10 @@ jobs:
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm test
- name: Publish to npm
run: |
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
npm publish --tag next --access public
else
npm publish --access public
fi
- run: npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- if: '!github.event.release.prerelease'
run: npm dist-tag add "$(npm view . name)@$(npm view . version)" latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test
on:
push:
branches: 'production'
branches: 'main'
paths:
- src/**
- test/**
Expand All @@ -10,7 +10,7 @@ on:
- '*.json'
- .github/workflows/test.yml
pull_request:
branches: 'production'
branches: 'main'
paths:
- src/**
- test/**
Expand All @@ -19,7 +19,7 @@ on:
- '*.json'
- .github/workflows/test.yml
concurrency:
group: test-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
test:
Expand Down