[fix] fix release.yml #63
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
# This is a basic workflow to help you get started with Actions | |
name: Release | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
tags: | |
- "v*" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
window: | |
# The type of runner that the job will run on | |
runs-on: windows-2022 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
# Uses NodeJs Environment | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
cache: "yarn" | |
- name: install dependencies | |
run: yarn install --frozen-lockfile | |
- name: build win x64 | |
run: yarn electron:build | |
- name: Get tag | |
id: tag | |
uses: dawidd6/action-get-tag@v1 | |
# - name: Archive Release | |
# run: powershell Compress-Archive -Path ./dist_electron/ -DestinationPath win_x64_Fabulous_${{steps.tag.outputs.tag}}.zip | |
- name: Rename | |
run: | | |
$v="${{steps.tag.outputs.tag}}".Substring(1) | |
mv "./dist_electron/Fabulous Setup $v.exe" "Fabulous-Setup-$v.exe" | |
mv "./dist_electron/Fabulous Setup $v.exe.blockmap" "Fabulous-Setup-$v.exe.blockmap" | |
mv "./dist_electron/latest.yml" "latest.yml" | |
- name: Upload Prerelease | |
uses: ncipollo/release-action@v1 | |
if: ${{ contains(steps.tag.outputs.tag,'beta') }} | |
with: | |
allowUpdates: true | |
artifacts: "*.exe,*.blockmap,*.yml" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: true | |
- name: Upload Release | |
uses: ncipollo/release-action@v1 | |
if: ${{ !contains(steps.tag.outputs.tag,'beta') }} | |
with: | |
allowUpdates: true | |
artifacts: "*.exe,*.blockmap,*.yml" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
macos: | |
runs-on: macos-14 | |
env: | |
USE_HARD_LINKS: false | |
CSC_LINK: ~/app.p12 | |
P12: ${{ secrets.APP_P12 }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
APP_ID: ${{ secrets.APP_ID }} | |
TEAM_ID: ${{ secrets.TEAM_ID }} | |
steps: | |
- uses: actions/checkout@v2 | |
# Uses NodeJs Environment | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
cache: "yarn" | |
- name: create app.p12 | |
run: | | |
cat > ~/app.p12.base64 << EOF | |
$P12 | |
EOF | |
base64 -D -i ~/app.p12.base64 -o ~/app.p12 | |
- name: install dependencies | |
run: yarn install --frozen-lockfile | |
- name: build macos x64 | |
run: yarn electron:build | |
- name: Get tag | |
id: tag | |
uses: dawidd6/action-get-tag@v1 | |
- name: Rename | |
run: | | |
ls -alh ./dist_electron/ | |
v=${{steps.tag.outputs.tag}} | |
v=${v:1} | |
mv ./dist_electron/Fabulous-$v-arm64.dmg ./Fabulous-$v-arm64.dmg | |
mv ./dist_electron/Fabulous-$v-arm64.dmg.blockmap ./Fabulous-$v-arm64.dmg.blockmap | |
mv ./dist_electron/latest-mac.yml ./latest-mac.yml | |
mv ./dist_electron/Fabulous-$v-arm64-mac.zip ./Fabulous-$v-arm64-mac.zip | |
mv ./dist_electron/Fabulous-$v-arm64-mac.zip.blockmap ./Fabulous-$v-arm64-mac.zip.blockmap | |
- name: Upload Prerelease | |
uses: ncipollo/release-action@v1 | |
if: ${{ contains(steps.tag.outputs.tag,'beta') }} | |
with: | |
allowUpdates: true | |
artifacts: "*.dmg,*.blockmap,*.yml,*.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: true | |
- name: Upload Release | |
uses: ncipollo/release-action@v1 | |
if: ${{ !contains(steps.tag.outputs.tag,'beta') }} | |
with: | |
allowUpdates: true | |
artifacts: "*.dmg,*.blockmap,*.yml,*.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} |