1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00
sap-jenkins-library/.github/workflows/release-go.yml
renovate[bot] f58bc66ae1
chore(deps): update actions/setup-java action to v4 (#4709)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jordi van Liempt <35920075+jliempt@users.noreply.github.com>
2023-12-05 12:19:40 +01:00

45 lines
2.3 KiB
YAML

name: Create new Release
on:
repository_dispatch:
types: perform-release
schedule:
- cron: '0 9 * * 1'
jobs:
build:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.11.0
- uses: actions/checkout@v4
# Workaround for https://github.com/SAP/jenkins-library/issues/1723, build only works with jdk8 currently
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: zulu
- name: Prepare Release
run: |
curl --insecure --silent --location --write-out '%{http_code}' --output ./piper_master https://github.com/SAP/jenkins-library/releases/latest/download/piper_master
curl --insecure --silent --location --write-out '%{http_code}' --output ./piper_master-darwin.x86_64 https://github.com/SAP/jenkins-library/releases/latest/download/piper_master-darwin.x86_64
curl --insecure --silent --location --write-out '%{http_code}' --output ./piper_master-darwin.arm64 https://github.com/SAP/jenkins-library/releases/latest/download/piper_master-darwin.arm64
cp ./piper_master ./piper
cp ./piper_master-darwin.x86_64 ./piper-darwin.x86_64
cp ./piper_master-darwin.arm64 ./piper-darwin.arm64
npm install semver --quiet
echo "PIPER_version=v$(node_modules/.bin/semver -i minor $(curl --silent "https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest" | jq -r .tag_name))" >> $GITHUB_ENV
- uses: SAP/project-piper-action@master
name: 'publish Linux master binary'
with:
piper-version: master
command: githubPublishRelease
flags: --token ${{ secrets.GITHUB_TOKEN }} --assetPathList ./piper_master --assetPathList ./piper --assetPathList ./piper_master-darwin.x86_64 --assetPathList ./piper-darwin.x86_64 --assetPathList ./piper_master-darwin.arm64 --assetPathList ./piper-darwin.arm64
- name: Build and publish jar for consumption in unit tests
run: mvn package
- uses: SAP/project-piper-action@master
name: 'publish Piper jar'
with:
piper-version: master
command: githubPublishRelease
flags: --token ${{ secrets.GITHUB_TOKEN }} --version latest --assetPath ./target/jenkins-library.jar