Skip to content

Setup workflow to upload to Maven central #4

Setup workflow to upload to Maven central

Setup workflow to upload to Maven central #4

Workflow file for this run

name: Release
on:
push:
branches: [main]
pull_request:
jobs:
publish:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
pkg: ["inngest"]
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: "8"
distribution: "temurin"
- uses: dorny/paths-filter@v3
id: ${{ matrix.pkg }}-changes

Check failure on line 24 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 24, Col: 13): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.pkg
with:
filters: |
${{ matrix.pkg }}/VERSION
- if: steps.${{ matrix.pkg }}-changes.outputs.src == 'true'
run: echo "${{ matrix.pkg }} version changed!"
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@v3
# - name: Publish package
# working-directory: ${{ matrix.pkg }}
# run: gradle publish --info
# env:
# MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
# MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
# GPG_SIGNING_KEY_PASSWORD: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}
# - name: Create bundle for Maven Central
# working-directory: ${{ matrix.pkg }}
# run: ./maven-bundle
# - name: Upload bundle to Maven Central
# working-directory: ${{ matrix.pkg }}
# run: |
# # Generate bearer token
# TOKEN=$(echo -n $AUTH | base64)
# PKG_NAME=$NAME:$(cat VERSION)
# # Upload via API
# curl -v -X POST "$PUBLISHER_API?name=$PKG_NAME" \
# -H "Authorization: Bearer $TOKEN" \
# -F '[email protected]'
# env:
# AUTH: "${{ secrets.MAVEN_USERNAME }}:${{ secrets.MAVEN_PASSWORD }}"
# NAME: com.inngest:inngest
# PUBLISHER_API: https://central.sonatype.com/api/v1/publisher/upload