Skip to content

Release 0.1.11

Release 0.1.11 #28

Workflow file for this run

name: Build
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
createrelease:
name: Create Release
runs-on: [ubuntu-latest]
steps:
- 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 }}
draft: false
prerelease: false
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v4
with:
name: release_url
path: release_url.txt
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
TARGET: macos
FORMAT: dmg
ASSET_MIME: application/x-apple-diskimage
- os: windows-latest
TARGET: windows
FORMAT: exe
ASSET_MIME: application/vnd.microsoft.portable-executable
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install Dependencies
run: npm install
- name: Build Release Files
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# with:
# name: release_on_${{ matrix. os }}
# path: release/
# retention-days: 5
- name: Load Release URL File from release job
uses: actions/download-artifact@v4
with:
name: release_url
- name: Get Release File Name & Upload URL
id: get_release_info
shell: bash
run: |
value=`cat release_url.txt`
echo ::set-output name=upload_url::$value
- name: Set env
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
./release/${{ env.RELEASE_VERSION }}/autocut-client_${{ env.RELEASE_VERSION }}.${{ matrix.FORMAT }}