Add newline #22
Workflow file for this run
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
on: | |
push: | |
tags: | |
- 'v*' | |
- '!**-voyager' | |
name: Create Release | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Extract Semver | |
id: semver_parser | |
run: | | |
semver=${TAG#"refs/tags/v"} | |
semver=${semver%"-voyager"} | |
echo ::set-output name=semver::$semver | |
env: | |
TAG: ${{ github.ref }} | |
- name: Set Version | |
run: echo ${{ steps.semver_parser.outputs.semver }} > src/main/resources/insider-version | |
- name: Build | |
run: gradle clean build | |
- name: Prepare Assets | |
run: | | |
mkdir insider | |
mkdir insider/results | |
cp README.md insider/README.md | |
cp build/libs/insider*.jar insider/insider.jar | |
cp bin/insider.sh insider/insider.sh | |
cp bin/insider.bat insider/insider.bat | |
chmod +x insider/insider.sh | |
cp languages.yml insider/languages.yml | |
cp -R config insider/config | |
- name: Create Archive | |
run: zip -r insider.zip insider | |
- 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: Insider ${{ 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: insider.zip | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
cache: 'npm' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@dxworks' | |
- name: Prepare Node App | |
run: | | |
npm install | |
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 }} |