Skip to content

Commit

Permalink
add release scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
gonwan committed Apr 5, 2024
1 parent 5e8d89b commit 78df8c5
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build

on: [ workflow_dispatch ]
on: workflow_dispatch

env:
APP_VERSION: '0.2.0'
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Release

on: workflow_dispatch

env:
APP_VERSION: '0.2.0'

jobs:
build-win-x64:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm install
- name: Build Windows
run: npm run build
- name: Package Windows
run: npm run pack-win
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Artifact - Windows
uses: softprops/action-gh-release@v2
#if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: v${{ env.APP_VERSION }}
files: |
release/m3u8downloader-v${{ env.APP_VERSION }}-win32-x64.zip
build-mac-x64:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm install
- name: Build MacOS
run: npm run build
- name: Package MacOS
run: npm run pack-mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Artifact - MacOS
uses: softprops/action-gh-release@v2
#if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: v${{ env.APP_VERSION }}
files: |
release/m3u8downloader-v${{ env.APP_VERSION }}-darwin-x64.dmg
build-linux-x64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm install
- name: Build Linux
run: npm run build
- name: Package Linux
run: npm run pack-linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Artifact - Linux
uses: softprops/action-gh-release@v2
#if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: v${{ env.APP_VERSION }}
files: |
release/m3u8downloader-v${{ env.APP_VERSION }}-linux-x64.tar.gz

0 comments on commit 78df8c5

Please sign in to comment.