Skip to content

Commit

Permalink
update release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
samie committed May 25, 2023
1 parent 7de4193 commit 6a7e13e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/directory-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: 'Publish to the Vaadin Directory'

env:
ADDON: nps

on:
release:
types: [published]
Expand All @@ -25,21 +22,24 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Set Version
id: set-version
run:
echo "Creating version ${{env.VERSION}}"
( cd addon && mvn versions:set -DnewVersion=${{VERSION}} )
- name: Initialize environment
id: init-environment
run: |
( cd addon && mvn versions:set -DnewVersion=${{github.ref_name}} )
echo "RELEASE_NAME=$(cd addon && mvn help:evaluate -Dexpression=project.name -q -DforceStdout)" >> $GITHUB_ENV
echo "RELEASE_VERSION=$(cd addon && mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
echo "RELEASE_ZIP=\"addon/target/$(cd addon && mvn help:evaluate -Dexpression=project.build.finalName -q -DforceStdout).zip\"" >> $GITHUB_ENV
- name: Build with Maven
run:
echo "Building ${{ADDON_ZIP}}"
echo "Building version ${{env.RELEASE_VERSION}} of ${{env.RELEASE_NAME}}"
( cd addon && mvn -B package -Pdirectory --file pom.xml )
echo "Package ${{env.RELEASE_ZIP}}"
- 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/${{ADDON}}" -F "authKey=${{ secrets.DIRECTORY_AUTH_KEY }}" -F "publish=true" -F "releaseNotes=test" -H "accept:\ */*" -H "Content-Type:\ multipart/form-data" -F "file=@${{ADDON_ZIP}}.zip;type=application/zip"
args: -X POST "https://vaadin.com/vaadincom/directory-service/upload/${{env.RELEASE_NAME}}" -F "authKey=${{ secrets.DIRECTORY_AUTH_KEY }}" -F "publish=true" -F "releaseNotes=test" -H "accept:\ */*" -H "Content-Type:\ multipart/form-data" -F "file=@${{env.RELEASE_ZIP}}.zip;type=application/zip"
- name: Report upload failure
if: ${{ job.status == 'failure' }}
run: echo '${{ toJSON(job) }}' ; exit 1

0 comments on commit 6a7e13e

Please sign in to comment.