Skip to content

TS-0 Fix release action #92

TS-0 Fix release action

TS-0 Fix release action #92

Workflow file for this run

name: Build-GraalVM
on:
push:
branches: '*'
tags: 'v*'
pull_request:
branches: '*'
env:
LINUX_ARTIFACT_NAME: target-linux
MAC_ARTIFACT_NAME: target-mac
WINDOWS_ARTIFACT_NAME: target-windows
jobs:
build-linux-graalvm:
name: Linux graalvm Build
# Build against a fixed version, as it determines our minimal Glibc requirements.
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: ayltai/setup-graalvm@v1
with:
java-version: 17
graalvm-version: 22.3.1
native-image: true
- name: Build
env:
TEAMSCALE_ACCESS_KEY: ${{ secrets.TEAMSCALE_ACCESS_KEY }}
run: mvn clean verify
- name: Reduce Image Size
# As `upx` creates a statically-linked executable, the `runs-on` image
# above determines the minimally required version of Glibc.
uses: crazy-max/ghaction-upx@v1
with:
version: latest
file: ./target/teamscale-upload
- name: 'Upload Artifact'
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ${{ LINUX_ARTIFACT_NAME }}

Check failure on line 43 in .github/workflows/build-graalvm.yml

View workflow run for this annotation

GitHub Actions / Build-GraalVM

Invalid workflow file

The workflow is not valid. .github/workflows/build-graalvm.yml (Line: 43, Col: 17): Unrecognized named-value: 'LINUX_ARTIFACT_NAME'. Located at position 1 within expression: LINUX_ARTIFACT_NAME .github/workflows/build-graalvm.yml (Line: 66, Col: 17): Unrecognized named-value: 'MAC_ARTIFACT_NAME'. Located at position 1 within expression: MAC_ARTIFACT_NAME
path: ./target
retention-days: 5
build-mac-graalvm:
name: MacOS graalvm Build
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: ayltai/setup-graalvm@v1
with:
java-version: 17
graalvm-version: 22.3.1
native-image: true
- name: Build
env:
TEAMSCALE_ACCESS_KEY: ${{ secrets.TEAMSCALE_ACCESS_KEY }}
run: mvn clean verify
- name: 'Upload Artifact'
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ${{ MAC_ARTIFACT_NAME }}
path: ./target
retention-days: 5
build-windows-graalvm:
name: Windows graalvm Build
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM
uses: ayltai/setup-graalvm@v1
with:
java-version: 17
graalvm-version: 22.3.1
native-image: true
- name: Build
env:
TEAMSCALE_ACCESS_KEY: ${{ secrets.TEAMSCALE_ACCESS_KEY }}
run: ./build-windows.bat
- name: 'Upload Artifact'
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ${{ WINDOWS_ARTIFACT_NAME }}
path: ./target
retention-days: 5
release-graalvm:
if: startsWith(github.ref, 'refs/tags/v')
needs:
- build-linux-graalvm
- build-mac-graalvm
- build-windows-graalvm
name: Create Release
runs-on: ubuntu-latest
env:
DISTRIBUTIONS_DIR: ./teamscale-upload-dists
steps:
- uses: actions/download-artifact@v4
with:
path: ${{ DISTRIBUTIONS_DIR }}
- name: Package
run: |
(cd $DISTRIBUTIONS_DIR/$LINUX_ARTIFACT_NAME && zip ../teamscale-upload-linux.zip teamscale-upload)
(cd $DISTRIBUTIONS_DIR/$MAC_ARTIFACT_NAME && zip ../teamscale-upload-mac.zip ./teamscale-upload)
(cd $DISTRIBUTIONS_DIR/$WINDOWS_ARTIFACT_NAME && zip ../teamscale-upload-windows.zip ./teamscale-upload.exe)
- name: List downloaded distributions
run: ls -1 $DISTRIBUTIONS_DIR/*.zip
- name: Upload Release Assets
id: create_release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: $DISTRIBUTIONS_DIR/teamscale-upload-*.zip
file_glob: true
overwrite: true