Cloudsmith Push Repository #9
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: Cloudsmith Push Repository | |
on: | |
workflow_dispatch: | |
# release: | |
# types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
settings-path: ${{ github.workspace }} | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@v4.5 | |
with: | |
maven-version: 3.9.0 | |
- name: Build | |
run: mvn -P release -B --file parent/pom.xml package | |
- name: Determine artifact to upload | |
id: TheZIP | |
# uses: actions/github-script@v4 | |
# with: | |
# result-encoding: string | |
# script: | | |
# const globber = await glob.create('releng/*-repo/target/cmake4eclipse-[0-9]*.[0-9]*.[0-9]*.zip') | |
# return await globber.glob() | |
# NOTE: glob gives us absolute paths which is not understtod by cloudsmith-io/action | |
run: 'echo "::set-output name=result::$(find com.cthing.cmakeed.site/target/ -type f -name CMakeEd-\*.zip)"' | |
- name: Artifact to upload | |
run: echo "${{steps.TheZIP.outputs.result}}" | |
- name: Upload | |
id: push | |
uses: cloudsmith-io/action@master | |
with: | |
api-key: ${{ secrets.CLOUDSMITH_AUTH }} | |
command: 'push' | |
format: 'raw' | |
# If true, the uploaded package will overwrite any others with the same attributes. | |
republish: false # optional, default is false | |
owner: '15knots' # Your Cloudsmith account name or org name (namespace) | |
repo: 'p2-zip' # Your Cloudsmith Repository name (slug) | |
file: '${{steps.TheZIP.outputs.result}}' # Name of file | |
no-wait-for-sync: true # Skip the waiting for package synchronisation (i.e. upload only) |