Skip to content

Release Action

Release Action #22

Workflow file for this run

name: Release Action
on:
workflow_dispatch:
jobs:
build_and_release:
runs-on: windows-latest
name: Build and create release
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node 16.16.0
uses: actions/setup-node@v3
with:
node-version: 16.16.0
- run: node -v
# - name: Get package version
# id: package-version
# uses: martinbeentjes/[email protected]
- name: Get package version
id: get-version
uses: beaconbrigade/[email protected]
with:
path: .
- name: Print the version
run: echo "Metadata tool version v${{ steps.get-version.outputs.version }}"
- name: Install dependencies
run: npm i
- name: Generate build
run: npm run build
- name: Sign executable/binary file
uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.SIGNING_CERT }}'
password: '${{ secrets.SIGNING_CERT_PASSWORD }}'
folder: './releases'
recursive: true
files: ./releases/*
description: 'Ultra Metadata Tool'
- name: Generate release body
run: |
echo ${{ steps.get-version.outputs.version }} >> release_body.txt
- run: ls ./releases
- name: Create release and add files
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.BLOCKCHAIN_CI_SECRET }}
with:
name: Release ${{ steps.get-version.outputs.version }}
tag_name: ${{ steps.get-version.outputs.version }}
body_path: release_body.txt
files: ./releases/*
- name: Upload to slack step
uses: MeilCli/slack-upload-file@v3
with:
slack_token: ${{ secrets.SLACK_TOKEN }}
channel_id: ${{ secrets.SLACK_CHANNEL_ID }}
file_type: auto
file_path: releases/*
initial_comment: '🎊 A new version of Metadata tool is available to download 🎊'
- run: echo "Finished. Job's status is ${{ job.status }}."