Skip to content

Commit

Permalink
feat(cicd): 在出现 tag 时自动产生 release
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlayer0 committed May 7, 2023
1 parent 76e634c commit 57b82bc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: release

permissions:
contents: write

on:
push:
branches:
- master
- 'cicd/release'
tags:
- "v*"
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -56,6 +58,7 @@ jobs:
- run: yarn install
- run: echo $CSC_IDENTITY_AUTO_DISCOVERY
- run: yarn electron:build --publish=never --skipElectronBuild
- run: cp -r build dist_electron/bundled/build
- run: npx electron-builder --project dist_electron/bundled/ --universal || true
- uses: actions/upload-artifact@v3
with:
Expand All @@ -66,11 +69,20 @@ jobs:
runs-on: ubuntu-latest
needs: [win-pack, linux-pack, mac-pack]
steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- uses: actions/download-artifact@v3
- run: ls -R
- uses: softprops/[email protected]
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
name: ${{ steps.get_version.outputs.VERSION }}
body: New Release.
draft: false
prerelease: false
files: |
./app.asar/*.asar
./linux-appImage/*.AppImage
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/universe-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
- run: yarn install
- run: echo $CSC_IDENTITY_AUTO_DISCOVERY
- run: yarn electron:build --publish=never --skipElectronBuild
- run: cp -r build dist_electron/bundled/build
- run: npx electron-builder --project dist_electron/bundled/ --universal || true
- uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ficus",
"version": "0.1.2",
"version": "0.1.3",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down

0 comments on commit 57b82bc

Please sign in to comment.