Skip to content

Commit

Permalink
github workflow updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Andste82 committed Jul 3, 2024
1 parent 221c9f3 commit beb61a6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package
name: NPM publish release

on:
release:
types: [created]
push:
tags:
- '*.*.*' # Trigger only on version tags, e.g., 1.0.0

jobs:
publish-npm:
Expand All @@ -14,9 +15,20 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gcc-mapfile-tool",
"version": "1.0.0",
"version": "1.0.1",
"description": "Mapfile tool for parsing GCC mapfiles",
"repository": {
"type": "git",
Expand Down

0 comments on commit beb61a6

Please sign in to comment.