generated from vaadin/addon-template
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (38 loc) · 1.3 KB
/
directory-publish.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
name: 'Publish to the Vaadin Directory'
env:
ADDON: nps
VERSION: ${{ github.ref_name }}
ADDON_ZIP: "addon/target/${{ADDON}}-${{VERSION}}.zip"
on:
release:
types: [published]
jobs:
validation-build:
uses: samie/nps/.github/workflows/validation-build.yml@v24
publish:
needs: [validation-build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Set Version
id: set-version
run:
( cd addon && mvn versions:set -DnewVersion=${{env.VERSION}} )
- name: Build with Maven
run:
( cd addon && mvn -B package -Pdirectory --file pom.xml )
- name: Upload to Vaadin Directory
id: upload
uses: wei/curl@v1
continue-on-error: false
with:
args: -X POST "https://vaadin.com/vaadincom/directory-service/upload/${{env.ADDON}}" -F "authKey=${{ secrets.DIRECTORY_AUTH_KEY }}" -F "publish=true" -F "releaseNotes=test" -H "accept:\ */*" -H "Content-Type:\ multipart/form-data" -F "file=@${{env.ADDON_ZIP}}.zip;type=application/zip"
- name: Report upload failure
if: ${{ job.status == 'failure' }}
run: echo '${{ toJSON(job) }}' ; exit 1