-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Custom build | ||
|
||
# Trigger the workflow every day at 5 AM (UTC). | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
custom-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out lingua-franca repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Prepare build environment | ||
uses: ./.github/actions/prepare-build-env | ||
- name: Modify property file to contain the commit SHA | ||
shell: bash | ||
run: | | ||
TIMESTAMP="$(date +'%Y-%m-%d')" | ||
SHA="$(git rev-parse --short HEAD)" | ||
sed --regexp-extended --in-place "s/^(VERSION = .*)$/\1 ${SHA} ${TIMESTAMP}/" core/src/main/resources/org/lflang/StringsBundle.properties | ||
- name: Build and package lf cli tools (nightly build) | ||
shell: bash | ||
run: | | ||
export TIMESTAMP="$(date +'%Y%m%d%H%M%S')" | ||
echo "timestamp=$TIMESTAMP" >> "$GITHUB_ENV" | ||
./gradlew build -Pnightly=$TIMESTAMP -PtargetOS=Linux -PtargetArch=x86_64 | ||
./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=Linux -PtargetArch=aarch64 | ||
./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=MacOS -PtargetArch=x86_64 | ||
./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=MacOS -PtargetArch=aarch64 | ||
./gradlew assemble -Pnightly=$TIMESTAMP -PtargetOS=Windows -PtargetArch=x86_64 | ||
- name: Deploy nightly release | ||
uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: "${{ secrets.NIGHTLY_BUILD }}" | ||
automatic_release_tag: '${{ github.ref_name }}-${{ github.env.timestamp }}' | ||
prerelease: true | ||
draft: true | ||
title: "Custom Lingua Franca build for ${{ github.ref_name }} branch" | ||
files: | | ||
build/distributions/* |