-
Notifications
You must be signed in to change notification settings - Fork 25
56 lines (48 loc) · 1.82 KB
/
upload-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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@v2
with:
java-version: '17'
distribution: 'adopt'
settings-path: ${{ github.workspace }}
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.9.0
- name: Build
run: mvn -P release -B -ntp 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 understood by cloudsmith-io/action
run: 'echo "::set-output name=result::$(find releng/repo/target/ -type f -name cmake4eclipse-\*.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)
# name: 'NAME' # Name for Raw package