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

ci: refactor into one workflow file #321

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
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
85 changes: 85 additions & 0 deletions .github/workflows/build-terre.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: Build WebGAL Terre

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
build-linux:
Expand All @@ -22,6 +28,7 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: sh release-linux.sh
- name: Upload Artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Linux
Expand Down Expand Up @@ -111,6 +118,7 @@ jobs:
rm -rf assets/templates/WebGAL_Android_Template/app/src/main/java/com
echo "WebGAL Terre is now ready to be deployed."
- name: Upload Artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Linux_Arm64
Expand All @@ -131,6 +139,7 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: sh release-mac.sh
- name: Upload Artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Mac
Expand All @@ -150,6 +159,7 @@ jobs:
shell: bash
run: ./release.sh
- name: Upload Artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Windows
Expand All @@ -172,8 +182,83 @@ jobs:
shell: bash
run: mkdir bundle && yarn nsis-bundle
- name: Upload Artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: WebGAL_Terre_Windows_Setup
path: bundle/WebGal_Terre_Setup.exe


release:
name: Release
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: ['build-linux','build-arm64','build-mac','build-windows','build-windows-nsis']
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: WebGAL Terre ${{ github.ref }}
body_path: releasenote.md
draft: true
prerelease: false

- name: Upload Linux Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: WebGAL_Terre_Linux/WebGAL_Terre_Linux.zip
asset_name: WebGAL_Terre_Linux_${{ github.ref_name }}.zip
asset_content_type: application/zip

- name: Upload Linux Arm64 Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: WebGAL_Terre_Linux_Arm64/WebGAL_Terre_Linux_Arm64.zip
asset_name: WebGAL_Terre_Linux_Arm64_${{ github.ref_name }}.zip
asset_content_type: application/zip

- name: Upload MacOS Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: WebGAL_Terre_Mac/WebGAL_Terre_Mac.zip
asset_name: WebGAL_Terre_Mac_${{ github.ref_name }}.zip
asset_content_type: application/zip

- name: Upload Windows Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: WebGAL_Terre_Windows/WebGAL_Terre_Windows.zip
asset_name: WebGAL_Terre_Windows_${{ github.ref_name }}.zip
asset_content_type: application/zip

- name: Upload Windows Setup Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: WebGAL_Terre_Windows_Setup/WebGal_Terre_Setup.exe
asset_name: WebGAL_Terre_Windows_Setup_${{ github.ref_name }}.exe
asset_content_type: application/vnd.microsoft.portable-executable
181 changes: 0 additions & 181 deletions .github/workflows/pr-check.yml

This file was deleted.

Loading