Whalebird-desktop-client-ma.../.github/workflows/release.yml

132 lines
3.9 KiB
YAML

name: Release
on:
release:
types: [published]
jobs:
release-linux:
name: Release for Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: yarn
- name: Build
run: |
make install
make clean
make build
- name: Package
env:
VERSION: ${{ github.event.release.name }}
run: |
make -e linux
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: "build/Whalebird-${{ github.event.release.name }}-linux-amd64.snap"
release: beta
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.tar.bz2"
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.AppImage"
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.deb"
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.rpm"
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.shasum"
release-windows:
name: Release for Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: yarn
- name: Build
run: |
make install
make clean
make build
- name: Package
env:
VERSION: ${{ github.event.release.name }}
run: |
make -e win32
make -e win64
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.exe"
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.shasum"
- name: Release to WinGet
uses: vedantmgoyal2009/winget-releaser@v2
if: github.event_name == 'release' && github.event.release.prerelease == false
with:
identifier: h3poteto.whalebird-desktop
version: ${{ github.event.release.tag_name }}
token: ${{ secrets.WINGET_TOKEN }}
release-darwin:
name: Release for MacOS
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: yarn
- name: Apple Codesigning
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- name: Build
run: |
make install
make clean
make build
- name: Package
env:
VERSION: ${{ github.event.release.name }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
ASC_PROVIDER: ${{ secrets.ASC_PROVIDER }}
TEAM_ID: ${{ secrets.ASC_PROVIDER }}
run: |
make -e mac
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.dmg"
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.shasum"