Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change release trigger to tag push #4344

Merged
merged 1 commit into from
May 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 47 additions & 68 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Release

on:
release:
types: [published]
push:
tags:
- 'v*'

jobs:
release-linux:
name: Release for Linux

runs-on: ubuntu-latest
timeout-minutes: 40

steps:
- uses: actions/checkout@v2
Expand All @@ -21,42 +21,28 @@ jobs:
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

- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.rpm"
- uses: shogo82148/actions-upload-release-asset@v1
# Log in to Snap Store
snapcraft_token: ${{ secrets.STORE_LOGIN }}

- name: Release
uses: samuelmeuli/action-electron-builder@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: "build/Whalebird-*.shasum"
skip_build: true
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}

release-windows:
name: Release for Windows
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

release-windows:
runs-on: windows-latest
timeout-minutes: 40

steps:
- uses: actions/checkout@v2
Expand All @@ -69,63 +55,56 @@ jobs:
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

- name: Release
uses: samuelmeuli/action-electron-builder@v1
with:
identifier: h3poteto.whalebird-desktop
version: ${{ github.event.release.tag_name }}
token: ${{ secrets.WINGET_TOKEN }}
skip_build: true
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

release-darwin:
name: Release for MacOS

release-macos:
runs-on: macos-latest
timeout-minutes: 40

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

- name: Release
uses: samuelmeuli/action-electron-builder@v1
env:
VERSION: ${{ github.event.release.name }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_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"
skip_build: true
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}