Skip to content

Updated release-voyager action #6

Updated release-voyager action

Updated release-voyager action #6

Workflow file for this run

on:
push:
tags:
- 'v*'
- '!v*-voyager'
name: Create ig-chr-changes Release
jobs:
release:
name: Release ig-chr-changes
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Extract Semver
id: semver_parser
run: |
semver=${TAG#"refs/tags/v"}
semver=${semver%"-chr"}
echo ::set-output name=semver::$semver
env:
TAG: ${{ github.ref }}
- name: Fill Version
run: |
tag=${{ steps.semver_parser.outputs.semver }}
sed -i "s/\$tag_version/$tag/" gitclient/pom.xml
- name: Build
run: mvn clean package
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
registry-url: 'https://npm.pkg.github.com'
scope: '@dxworks'
- name: Prepare Node App
run: |
npm ci
npm run build
- name: Setup Version
run: |
ls -al node_modules/.bin
node_modules/.bin/json -I -f package.json -e "this.version='$VERSION'"
env:
VERSION: ${{ steps.semver_parser.outputs.semver }}
- name: Publish NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node with NPM Package Registry
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
scope: '@dxworks'
- name: Publish on NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Prepare Release Notes
run: touch ${{ github.workspace }}/releaseNotes/v${{ steps.semver_parser.outputs.semver }}.md
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
name: Inspector Git ${{ steps.semver_parser.outputs.semver }}
body_path: ${{ github.workspace }}/releaseNotes/v${{ steps.semver_parser.outputs.semver }}.md
body: ""
prerelease: false
draft: false
fail_on_unmatched_files: true
files: |
dist/ig-chr-helper.jar
dist/iglog.jar