Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Merge pull request #2 from BTS-CM/context_isolation #48

Merge pull request #2 from BTS-CM/context_isolation

Merge pull request #2 from BTS-CM/context_isolation #48

Workflow file for this run

name: Build/release
on:
push:
tags:
- "v*.*.*"
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: BTS-CM/action-gh-release@cd28b0f5ee8571b76cfdaa62a30d51d752317477
with:
name: ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: false
build:
name: build_release
needs: create_release
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
release_suffix: windows
release_format: exe
- os: ubuntu-latest
release_suffix: ubuntu
release_format: deb
- os: macos-latest
release_suffix: macos
release_format: dmg
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
#cache: 'yarn'
# Temporarily disabling to generate newest release
#- name: Instruct yarn to use cache
# run: yarn --prefer-offline
- run: yarn install --network-concurrency 1
- run: yarn run electron:package:${{ matrix.os }}
- name: Upload .${{ matrix.release_format }} file
uses: actions/upload-artifact@v3
with:
name: nft_viewer.${{ matrix.release_format }}
path: dist/nft_viewer.${{ matrix.release_format }}
- run: ls dist
generate:
name: generate files
needs: build
runs-on: ubuntu-latest
steps:
- name: reqs
run: sudo apt-get install unzip
- name: Download VT
run: wget https://github.com/VirusTotal/vt-cli/releases/download/0.10.2/Linux64.zip
- name: Unzip VT
run: unzip Linux64.zip
- name: Prepare
run: chmod +x vt
- name: Download exe
id: download
uses: actions/download-artifact@v3
with:
name: nft_viewer.exe
path: ~/
- name: Download deb
uses: actions/download-artifact@v3
with:
name: nft_viewer.deb
path: ~/
- name: Download dmg
uses: actions/download-artifact@v3
with:
name: nft_viewer.dmg
path: ~/
- name: scan
id: scan
run: |
echo "::set-output name=debVT::$(./vt scan file /home/runner/nft_viewer.deb -k ${{ secrets.VT_API_KEY }}|cut -d' ' -f2)"
echo "::set-output name=exeVT::$(./vt scan file /home/runner/nft_viewer.exe -k ${{ secrets.VT_API_KEY }}|cut -d' ' -f2)"
echo "::set-output name=dmgVT::$(./vt scan file /home/runner/nft_viewer.dmg -k ${{ secrets.VT_API_KEY }}|cut -d' ' -f2)"
- name: Calculate hashes
id: calc_hash
run: |
echo "::set-output name=debhash::$(sha256sum /home/runner/nft_viewer.deb|cut -c-64)"
echo "::set-output name=exehash::$(sha256sum /home/runner/nft_viewer.exe|cut -c-64)"
echo "::set-output name=dmghash::$(sha256sum /home/runner/nft_viewer.dmg|cut -c-64)"
- name: Perform release
uses: BTS-CM/action-gh-release@cd28b0f5ee8571b76cfdaa62a30d51d752317477
with:
files: |
/home/runner/nft_viewer.exe
/home/runner/nft_viewer.deb
/home/runner/nft_viewer.dmg
tag_name: ${{ needs.create_release.outputs.tag-name }}
body: |
Release Notes
_________________________________
Binaries for download
--------
| Platform | SHA256 Checksum | VirusTotal Analyses |
|---|---|---|
|[Microsoft Windows](https://github.com/BTS-CM/NFT_Viewer/releases/download/${{ github.ref_name }}/nft_viewer.exe)|`${{steps.calc_hash.outputs.exehash}}`|[exe](https://www.virustotal.com/gui/file-analysis/${{steps.scan.outputs.exeVT}})|
|[Linux](https://github.com/BTS-CM/NFT_Viewer/releases/download/${{ github.ref_name }}/nft_viewer.deb)|`${{steps.calc_hash.outputs.debhash}}`|[deb](https://www.virustotal.com/gui/file-analysis/${{steps.scan.outputs.debVT}})|
|[MacOS](https://github.com/BTS-CM/NFT_Viewer/releases/download/${{ github.ref_name }}/nft_viewer.dmg)|`${{steps.calc_hash.outputs.dmghash}}`|[dmg](https://www.virustotal.com/gui/file-analysis/${{steps.scan.outputs.dmgVT}})|
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}