Skip to content

Commit

Permalink
set version and also release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin67 committed Feb 29, 2024
1 parent 6cbb906 commit 1f5cb45
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Set version
working-directory: ${{ matrix.pkg }}
run: echo "PKG_VERSION=$(cat VERSION)" >> $GITHUB_ENV

- name: Publish package
working-directory: ${{ matrix.pkg }}
run: gradle publish --info
Expand All @@ -56,13 +60,17 @@ jobs:
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" \
curl -v -X POST "$PUBLISHER_API?name=$PKG_NAME&publishingType=USER_MANAGED" \
-H "Authorization: Bearer $TOKEN" \
-F '[email protected]'
env:
AUTH: "${{ secrets.MAVEN_USERNAME }}:${{ secrets.MAVEN_PASSWORD }}"
NAME: com.inngest:inngest
PKG_NAME: com.inngest:${{ matrix.pkg }}:${{ env.PKG_VERSION }}
PUBLISHER_API: https://central.sonatype.com/api/v1/publisher/upload

- name: Create tag for pkg
run: git tag $TAG && git push $TAG
env:
TAG: ${{ matrix.pkg }}-${{ env.PKG_VERSION }}

0 comments on commit 1f5cb45

Please sign in to comment.