-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Npm directory update | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
publish: | ||
name: Build, bump & publish to npm | ||
runs-on: ubuntu-latest | ||
container: httptoolkit/act-build-base:v3.0.0 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- run: npm ci | ||
|
||
# Check that the tests and overall build all still pass: | ||
- run: npm test | ||
- run: npm run build | ||
|
||
# Create the new release: | ||
- name: Bump version & push | ||
run: | | ||
git config --global user.name 'Automated publish' | ||
git config --global user.email 'pimterry@users.noreply.github.com' | ||
npm version patch | ||
git push && git push --tags | ||
# Publish the release to npm: | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |