-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wb-joy
committed
Aug 12, 2022
1 parent
8f18130
commit b43ae04
Showing
1 changed file
with
105 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: build releases | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build_win: | ||
name: Build (Windows) | ||
runs-on: windows-latest | ||
|
||
if: github.event.release.tag_name | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
pwd | ||
git clone --depth 1 https://${{ secrets.GIT_TOKEN }}@evove.top:6443/JoyLee/via-electron-wb.git | ||
cd via-electron-wb/source | ||
npm install -g [email protected] | ||
npm install -g cross-env | ||
npm config set electron_mirror https://github.com/WestBerryVIA/electron-archive/releases/download/ | ||
npm run dist | ||
- name: read version | ||
id: version | ||
uses: ashley-taylor/[email protected] | ||
with: | ||
path: via-electron-wb/source/package.json | ||
property: version | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: VIA-${{steps.version.outputs.value}}-win.zip | ||
path: via-electron-wb/source/build/VIA-${{steps.version.outputs.value}}-win.zip | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: VIA Setup ${{steps.version.outputs.value}}.exe | ||
path: via-electron-wb/source/build/VIA Setup ${{steps.version.outputs.value}}.exe | ||
|
||
build_macos: | ||
name: Build (macOS) | ||
runs-on: macOS-latest | ||
|
||
if: github.event.release.tag_name | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
pwd | ||
git clone --depth 1 https://${{ secrets.GIT_TOKEN }}@evove.top:6443/JoyLee/via-electron-wb.git | ||
cd via-electron-wb/source | ||
npm install -g [email protected] | ||
npm install -g cross-env | ||
npm config set electron_mirror https://github.com/WestBerryVIA/electron-archive/releases/download/ | ||
npm run dist | ||
- name: read version | ||
id: version | ||
uses: ashley-taylor/[email protected] | ||
with: | ||
path: via-electron-wb/source/package.json | ||
property: version | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: VIA-${{steps.version.outputs.value}}-mac.zip | ||
path: via-electron-wb/source/build/VIA-${{steps.version.outputs.value}}-mac.zip | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: VIA-${{steps.version.outputs.value}}.dmg | ||
path: via-electron-wb/source/build/VIA-${{steps.version.outputs.value}}.dmg | ||
|
||
publish_release: | ||
name: Publish (Release) | ||
runs-on: ubuntu-latest | ||
|
||
needs: [build_macos, build_win] | ||
|
||
if: github.event.release.tag_name | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
|
||
- uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: ${{ github.event.release.name }} | ||
files: | | ||
./VIA Setup ${{ github.event.release.tag_name }}.exe/VIA Setup ${{ github.event.release.tag_name }}.exe | ||
./VIA-${{ github.event.release.tag_name }}-win.zip/VIA-${{ github.event.release.tag_name }}-win.zip | ||
./VIA-${{ github.event.release.tag_name }}.dmg/VIA-${{ github.event.release.tag_name }}.dmg | ||
./VIA-${{ github.event.release.tag_name }}-mac.zip/VIA-${{ github.event.release.tag_name }}-mac.zip |