release #84
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
name: release | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm i | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
create-release: | |
name: Create Github Release | |
needs: publish-npm | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create 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 }} | |
body: "Patch note will come..." | |
draft: false | |
prerelease: false | |
build-binaries: | |
name: Create Binaries | |
needs: create-release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 20.9.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.9.0 | |
- uses: olegtarasov/[email protected] | |
id: tagName | |
- run: npm i --omit=dev | |
- run: npm i -g [email protected] | |
- run: pkg --compress GZip -t node18-win-x64 ./bin/shared/loginServer.js --output ./bin/loginServer-2015-${{ steps.tagName.outputs.tag }}.exe | |
- run: pkg --compress GZip -t node18-win-x64 ./bin/2015/zoneServer.js --output ./bin/zoneServer-2015-${{ steps.tagName.outputs.tag }}.exe | |
- run: pkg --compress GZip -t node18-win-x64 ./bin/2015/h1emuServer.js --output ./bin/h1emuServer-2015-${{ steps.tagName.outputs.tag }}.exe | |
- run: pkg --compress GZip -t node18-win-x64 ./bin/2016/zoneServer.js --output ./bin/zoneServer-2016-${{ steps.tagName.outputs.tag }}.exe | |
- run: pkg --compress GZip -t node18-win-x64 ./bin/2016/h1emuServer.js --output ./bin/h1emuServer-2016-${{ steps.tagName.outputs.tag }}.exe | |
- name: Upload h1emuServer-2015 to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./bin/h1emuServer-2015-${{ steps.tagName.outputs.tag }}.exe | |
asset_name: h1emuServer-2015-${{ steps.tagName.outputs.tag }}.exe | |
tag: ${{ github.ref }} | |
- name: Upload zoneServer-2015 to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./bin/zoneServer-2015-${{ steps.tagName.outputs.tag }}.exe | |
asset_name: zoneServer-2015-${{ steps.tagName.outputs.tag }}.exe | |
tag: ${{ github.ref }} | |
- name: Upload loginServer-2015 to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./bin/loginServer-2015-${{ steps.tagName.outputs.tag }}.exe | |
asset_name: loginServer-2015-${{ steps.tagName.outputs.tag }}.exe | |
tag: ${{ github.ref }} | |
- name: Upload h1emuServer-2016 to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./bin/h1emuServer-2016-${{ steps.tagName.outputs.tag }}.exe | |
asset_name: h1emuServer-2016-${{ steps.tagName.outputs.tag }}.exe | |
tag: ${{ github.ref }} | |
- name: Upload zoneServer-2016 to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ./bin/zoneServer-2016-${{ steps.tagName.outputs.tag }}.exe | |
asset_name: zoneServer-2016-${{ steps.tagName.outputs.tag }}.exe | |
tag: ${{ github.ref }} | |
build-docker-images: | |
name: Create and push docker images | |
needs: create-release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 20.9.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.9.0 | |
- uses: olegtarasov/[email protected] | |
id: tagName | |
- uses: docker-practice/actions-setup-docker@master | |
- run: npm i | |
- run: npm run build-docker-images | |
- run: sudo docker login -u qgruber -p ${{ secrets.DOCKER_HUB_TOKEN }} | |
- run: sudo docker image push h1emu/server:${{ steps.tagName.outputs.tag }} | |
- run: sudo docker image push h1emu/server-2016:${{ steps.tagName.outputs.tag }} | |
- run: sudo docker image push h1emu/login-server:${{ steps.tagName.outputs.tag }} | |
- run: sudo docker image push h1emu/zone-server:${{ steps.tagName.outputs.tag }} | |
- run: sudo docker image push h1emu/zone-server-2016:${{ steps.tagName.outputs.tag }} | |
- run: sudo docker image push h1emu/server:latest | |
- run: sudo docker image push h1emu/server-2016:latest | |
- run: sudo docker image push h1emu/login-server:latest | |
- run: sudo docker image push h1emu/zone-server:latest | |
- run: sudo docker image push h1emu/zone-server-2016:latest |