Release #17
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
name: Release | |
on: workflow_dispatch | |
jobs: | |
build-win-x64: | |
runs-on: windows-2019 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm install | |
- name: Get Version | |
id: get-version | |
run: node -p -e "'VERSION='+require('./package.json').version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | |
- 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/') | |
env: | |
APP_VERSION: ${{ steps.get-version.outputs.VERSION }} | |
with: | |
tag_name: v${{ env.APP_VERSION }} | |
files: | | |
release/m3u8downloader-v${{ env.APP_VERSION }}-win32-x64.zip | |
build-mac-x64: | |
# macos-12 is the last to be compatible with macbook pro 2015 | |
runs-on: macos-13 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm install | |
- name: Get Version | |
id: get-version | |
run: node -p -e "'VERSION='+require('./package.json').version" >> "$GITHUB_OUTPUT" | |
- 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/') | |
env: | |
APP_VERSION: ${{ steps.get-version.outputs.VERSION }} | |
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 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm install | |
- name: Get Version | |
id: get-version | |
run: node -p -e "'VERSION='+require('./package.json').version" >> "$GITHUB_OUTPUT" | |
- 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/') | |
env: | |
APP_VERSION: ${{ steps.get-version.outputs.VERSION }} | |
with: | |
tag_name: v${{ env.APP_VERSION }} | |
files: | | |
release/m3u8downloader-v${{ env.APP_VERSION }}-linux-x64.tar.gz |