From beb61a66284714aad8b88817e4127374b02bfd05 Mon Sep 17 00:00:00 2001 From: Andreas Steinbart Date: Wed, 3 Jul 2024 18:55:05 +0200 Subject: [PATCH] github workflow updated --- .github/workflows/npm-publish.yml | 20 ++++++++++++++++---- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 4cc10cc..65ce353 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -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: @@ -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 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 115c2f6..81567a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gcc-mapfile-tool", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "gcc-mapfile-tool", - "version": "1.0.0", + "version": "1.0.1", "license": "MIT", "dependencies": { "command-line-args": "^5.2.1" diff --git a/package.json b/package.json index 56ce6d6..2d281c8 100644 --- a/package.json +++ b/package.json @@ -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",