commit
27e70b6df8
1 changed files with 18 additions and 13 deletions
31
.github/workflows/native-build.yml
vendored
31
.github/workflows/native-build.yml
vendored
|
|
@ -6,27 +6,32 @@ on:
|
||||||
tag:
|
tag:
|
||||||
required: true
|
required: true
|
||||||
description: "Ref to build from (e.g. v1.0.0)"
|
description: "Ref to build from (e.g. v1.0.0)"
|
||||||
|
push:
|
||||||
env:
|
tags:
|
||||||
PYTHON_VERSION: 3.11
|
- "v*"
|
||||||
PNPM_VERSION: 10
|
|
||||||
NODE_VERSION: 20
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
permissions:
|
runs-on: ${{ matrix.os }}
|
||||||
packages: write
|
|
||||||
contents: write
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
PYTHON_VERSION: 3.11
|
||||||
|
PNPM_VERSION: 10
|
||||||
|
NODE_VERSION: 20
|
||||||
|
TAG_NAME: ${{ github.event.inputs.tag || github.ref_name }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repo
|
- name: Checkout source repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.tag }}
|
ref: ${{ env.TAG_NAME }}
|
||||||
|
|
||||||
- name: Cache Chocolatey packages
|
- name: Cache Chocolatey packages
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
|
|
@ -97,14 +102,14 @@ jobs:
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: app-${{ matrix.os }}-${{ github.event.inputs.tag }}
|
name: app-${{ matrix.os }}-${{ env.TAG_NAME }}
|
||||||
path: dist/*
|
path: dist/*
|
||||||
|
|
||||||
- name: Upload to GitHub Release
|
- name: Upload to GitHub Release
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(env.TAG_NAME, 'v')
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.event.inputs.tag }}
|
tag_name: ${{ env.TAG_NAME }}
|
||||||
files: dist/*
|
files: dist/*
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue