chore: release cli 0.3.1 (#35) #1
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
# | |
# Copyright (c) 2021-2023 - for information on the respective copyright owner | |
# see the NOTICE file and/or the repository https://github.com/carbynestack/cli. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
name: Publish and Release | |
on: | |
push: | |
tags: | |
- "cli-v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
publish: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Retrieve license obligation resources | |
id: license-obligations | |
run: | | |
cd 3RD-PARTY-LICENSES | |
FILES=$(find . -maxdepth 1 -type d -not -path .) | |
if [ -n "$FILES" ] | |
then | |
echo "${FILES}" | zip -r@ 3rd-party-copyrights | |
fi | |
find . -iname origin.src | \ | |
awk '{ \ | |
split($0,b,"/"); \ | |
system("xargs < " $0 " curl --create-dirs -Lo ./sources/" b[2] ".zip " $2)}' && \ | |
find -regex './sources$' | awk '{system("zip -jr ./3rd-party-sources.zip " $0)}' | |
mkdir -p ../license-obligations | |
ARCHIVES=$(find . -regex "^./3rd-party-.*.zip$") | |
OBLIGATIONS_FOUND="false" | |
if [ -n "$ARCHIVES" ] | |
then | |
mv $(echo "${ARCHIVES}") ../license-obligations/ | |
OBLIGATIONS_FOUND="true" | |
fi | |
echo "OBLIGATIONS_FOUND=${OBLIGATIONS_FOUND}" >> $GITHUB_OUTPUT | |
- name: Update Release with license obligations resources | |
uses: ncipollo/release-action@v1 | |
if: steps.license-obligations.outputs.OBLIGATIONS_FOUND == 'true' | |
with: | |
allowUpdates: true | |
artifacts: license-obligations/* | |
artifactErrorsFailBuild: true | |
makeLatest: true | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
- name: Setup java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Setting up Github Package Repository as Maven Repository | |
uses: s4u/[email protected] | |
with: | |
githubServer: false | |
servers: | | |
[{ | |
"id": "github", | |
"username": "${{ secrets.GHPR_USERNAME }}", | |
"password": "${{ secrets.GHPR_TOKEN }}" | |
}] | |
- name: Publish version to GitHub Packages | |
run: mvn deploy -Dskip.tests --batch-mode --no-transfer-progress |