This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
Create Release on Push (#6) #18
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: "godot-ci export" | |
on: | |
push: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
GODOT_VERSION: 4.2.1 | |
jobs: | |
export-windows: | |
name: Windows Export | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set current date as env variable | |
run: | | |
_ts=$(date -d '${{ github.event.head_commit.timestamp}}' +'%Y%m%d%H%M%S') | |
echo "target_tag=${_ts}" >> $GITHUB_ENV | |
- name: Checkout main repo | |
uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- uses: chickensoft-games/setup-godot@v1 | |
name: Setup Godot | |
with: | |
version: 4.2.1 | |
- name: Download Windows artifact | |
id: download-win-artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
workflow: windows.yml | |
workflow_conclusion: success | |
repo: adastralgroup/winter | |
- name: Download Linux artifact | |
id: download-lin-artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
workflow: linux.yml | |
workflow_conclusion: success | |
repo: adastralgroup/winter | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libnotify4 libnotify-dev libcurl4-openssl-dev | |
cp linux/* bin/ | |
cp windows/* bin/ | |
mkdir -v -p build/windows | |
cp windows/* build/windows | |
- name: Windows Build | |
run: | | |
godot -v --export-debug --headless "Windows Desktop" build/windows/adastral.exe | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: windows | |
path: build/windows/ | |
- name: Create zip file | |
run: | | |
cd build/windows/ | |
zip -r ../windows.zip . | |
- name: Upload binaries to release | |
uses: softprops/action-gh-release@v1 | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
with: | |
files: build/windows.zip | |
tag_name: ${{ env.target_tag }} | |
draft: false | |
prerelease: true | |
export-linux: | |
name: Linux Export | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set current date as env variable | |
run: | | |
_ts=$(date -d '${{ github.event.head_commit.timestamp}}' +'%Y%m%d%H%M%S') | |
echo "target_tag=${_ts}" >> $GITHUB_ENV | |
- uses: chickensoft-games/setup-godot@v1 | |
name: Setup Godot | |
with: | |
version: 4.2.1 | |
- name: Checkout main repo | |
uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- name: Download artifact | |
id: download-artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
workflow: linux.yml | |
workflow_conclusion: success | |
repo: adastralgroup/winter | |
- name: Setup | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libnotify4 libnotify-dev libcurl4-openssl-dev | |
cp linux/* bin/ | |
- name: Linux Build | |
run: | | |
mkdir -v -p build/linux | |
godot -v --export-debug --headless "Linux/X11" build/linux/adastral.x86_64 | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: linux | |
path: build/linux | |
- name: Create zip file | |
run: | | |
cd build/linux/ | |
zip -r ../linux.zip . | |
- name: Upload binaries to release | |
uses: softprops/action-gh-release@v1 | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
with: | |
files: build/linux.zip | |
tag_name: ${{ env.target_tag }} | |
draft: false | |
prerelease: true |