build: v2.6.46 #9
Workflow file for this run
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: build | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
env: | |
# don't auto-upgrade the gotoolchain | |
# https://github.com/docker-library/golang/issues/472 | |
GOTOOLCHAIN: local | |
jobs: | |
run: | |
runs-on: windows-latest | |
env: | |
GO_VERSION: '1.21' | |
NODE_VERSION: '16' | |
JAVA_VERSION: '11' | |
ANT_VERSION: '1.10.8' | |
JAVA_TOOL_OPTIONS: '-Dfile.encoding=UTF8' | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
cache: true | |
- | |
name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- | |
name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: adopt | |
java-version: ${{ env.JAVA_VERSION }} | |
- | |
name: Set up ANT | |
run: | | |
choco install ant --no-progress --force -y --version $Env:ANT_VERSION | |
$Env:PATH = "C:\ProgramData\chocolatey\lib\ant\tools\apache-ant-$Env:ANT_VERSION\bin;$Env:PATH" | |
echo "ANT_HOME=C:\ProgramData\chocolatey\lib\ant\tools\apache-ant-$Env:ANT_VERSION" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
- | |
name: Java version | |
run: | | |
java -XshowSettings:properties -version | |
- | |
name: ANT version | |
run: | | |
ant -version | |
- | |
name: Node version | |
run: | | |
node --version | |
- | |
name: Config | |
run: | | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
echo "$(go env GOPATH)/bin/windows_386" >> $GITHUB_PATH | |
echo "PORTAPPS_VERSION=$(cat go.mod | grep github.com/portapps/portapps | awk '{print $NF}')" >> $GITHUB_ENV | |
echo "PORTAPPS_DIR=./.portapps" >> $GITHUB_ENV | |
if [[ $GITHUB_REF == refs/tags/* ]]; then | |
echo "GIT_TAGNAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
fi | |
shell: bash | |
- | |
name: Checkout core | |
uses: actions/checkout@v4 | |
with: | |
repository: portapps/portapps | |
ref: ${{ env.PORTAPPS_VERSION }} | |
path: ${{ env.PORTAPPS_DIR }} | |
- | |
name: Cache Portapps bin | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.PORTAPPS_DIR }}/bin | |
key: portapps-bin-${{ env.PORTAPPS_VERSION }} | |
- | |
name: Build | |
run: | | |
ant release -Dcore.dir=${{ env.PORTAPPS_DIR }} | |
shell: bash | |
- | |
name: Upload assets | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }} | |
path: bin/release/* | |
- | |
name: GitHub Release | |
uses: crazy-max/ghaction-github-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
files: | | |
bin/release/* | |
name: ${{ env.GIT_TAGNAME }} | |
token: ${{ secrets.REPO_TOKEN }} | |
- | |
name: Dump context | |
if: always() | |
uses: crazy-max/ghaction-dump-context@v2 |