Skip to content

Added test release build identification in help text output. #116

Added test release build identification in help text output.

Added test release build identification in help text output. #116

Workflow file for this run

---
name: build-all
on:
workflow_dispatch:
push:
jobs:
build-linux:
runs-on: ubuntu-22.04
strategy:
matrix:
flavour: [pkg-appimage-snapshot, pkg-appimage-deployment, pkg-appimage]
steps:
## This is for debugging only and helps developing the workflow.
# - name: Environment Variables
# run: |
# printenv | sort
- name: Update Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y git
- name: Checkout Oolite
uses: actions/checkout@v6
with:
path: oolite
fetch-depth: 0
submodules: true
- name: Checkout dependencies
run: |
oolite/ShellScripts/Linux/checkout_deps.sh
- name: Install packages
run: |
sudo oolite/ShellScripts/Linux/install_deps_root.sh
- name: Build Oolite
run: |
oolite/ShellScripts/common/build_oolite.sh ${{matrix.flavour}}
- name: Archive installer
uses: actions/upload-artifact@v6
with:
name: oolite-linux-${{matrix.flavour}}
path: |
oolite/build/Oolite_*.AppImage
retention-days: 5
build-flatpak:
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08
options: --privileged
steps:
- name: Checkout Oolite
uses: actions/checkout@v6
with:
path: oolite
fetch-depth: 0
submodules: true
- name: Build flatpak
run: |
oolite/installers/flatpak/create_flatpak.sh
- name: Archive installer
uses: actions/upload-artifact@v6
with:
name: oolite-flatpak
path: |
oolite/build/space.oolite.Oolite*.flatpak
retention-days: 5
build-windows:
runs-on: windows-latest
strategy:
matrix:
flavour: [pkg-win-snapshot, pkg-win-deployment, pkg-win]
steps:
## This is for debugging only and helps developing the workflow.
# - name: Environment Variables
# run: |
# Get-ChildItem Env: | Sort Name
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
- name: Checkout Oolite
uses: actions/checkout@v6
with:
path: oolite
fetch-depth: 0
submodules: true
- name: Download latest release assets
uses: robinraju/release-downloader@v1
with:
repository: OoliteProject/oolite_windeps_build
latest: true
fileName: "*"
out-file-path: oolite/build/packages
- name: Install packages
shell: msys2 {0}
env:
msystem: UCRT64
run: |
oolite/ShellScripts/Windows/install_deps.sh clang
- name: Build Oolite
shell: msys2 {0}
env:
msystem: UCRT64
run: |
oolite/ShellScripts/common/build_oolite.sh ${{matrix.flavour}}
- name: Archive installer
uses: actions/upload-artifact@v6
with:
name: oolite-windows-${{matrix.flavour}}
path: |
oolite/build/OoliteInstall*.exe
retention-days: 5
release:
needs: [build-linux, build-flatpak, build-windows]
runs-on: ubuntu-22.04
steps:
## This is for debugging only and helps developing the workflow.
# - name: Environment Variables
# run: |
# printenv | sort
- name: Download artifacts
uses: actions/download-artifact@v7
with:
path: artifacts
- name: Checkout Oolite
uses: actions/checkout@v6
with:
path: oolite
fetch-depth: 0
- name: Calculate version number and set OOLITE_VERSION
id: version
run: |
set -x
cd oolite
# Build version string,
# taking into account that we may have just two digits
source ShellScripts/common/get_version.sh
cat build/OOLITE_VERSION.txt >> "$GITHUB_OUTPUT"
- name: Remove old prereleases
if: github.ref == 'refs/heads/master'
uses: s00d/delete-older-releases@0.2.1
with:
keep_latest: 7
delete_type: 'prerelease'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# For changes on master branch, create a new release.
# It should move the 'latest' tag automatically.
- name: Create Release
if: github.ref == 'refs/heads/master'
id: create_release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
# automatic_release_tag: "latest"
automatic_release_tag: "${{ steps.version.outputs.OOLITE_VERSION }}"
prerelease: true
title: "Oolite ${{ steps.version.outputs.OOLITE_VERSION }}"
files: |
artifacts/oolite-windows-pkg-win-snapshot/OoliteInstall-*-dev.exe
artifacts/oolite-windows-pkg-win-deployment/OoliteInstall-*.exe
artifacts/oolite-windows-pkg-win/OoliteInstall-*.exe
artifacts/oolite-linux-pkg-appimage-snapshot/*.AppImage
artifacts/oolite-linux-pkg-appimage-deployment/*.AppImage
artifacts/oolite-linux-pkg-appimage/*.AppImage
artifacts/oolite-flatpak/*.flatpak
- name: Remove old workflow runs
if: github.ref == 'refs/heads/master'
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 30
keep_minimum_runs: 8