Skip to content
name: 'Publish to the Vaadin Directory'
env:
ADDON: nps
on:
release:
types: [published]
jobs:
validation-build:
uses: samie/nps/.github/workflows/validation-build.yml@v24
publish:
needs: [validation-build]
runs-on: ubuntu-latest
env:
VERSION: ${{ github.ref_name }}
ADDON_ZIP: "addon/target/${{ADDON}}-${{ github.ref_name }}.zip"

Check failure on line 19 in .github/workflows/directory-publish.yml

View workflow run for this annotation

GitHub Actions / Publish to the Vaadin Directory

Invalid workflow file

The workflow is not valid. .github/workflows/directory-publish.yml (Line: 19, Col: 18): Unrecognized named-value: 'ADDON'. Located at position 1 within expression: ADDON .github/workflows/directory-publish.yml (Line: 31, Col: 9): Unrecognized named-value: 'VERSION'. Located at position 1 within expression: VERSION
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:
echo "Creating version ${{env.VERSION}}"
( cd addon && mvn versions:set -DnewVersion=${{VERSION}} )
- name: Build with Maven
run:
echo "Building ${{ADDON_ZIP}}"
( 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/${{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"
- name: Report upload failure
if: ${{ job.status == 'failure' }}
run: echo '${{ toJSON(job) }}' ; exit 1