Skip to content

Commit

Permalink
add artifact publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Savrov committed Dec 10, 2023
1 parent 531e7d2 commit c51f909
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ jobs:
packages: write
steps:
- name: Extract branch name
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/:8}" >> $GITHUB_ENV
run: |
BRANCH_NAME=${GITHUB_REF#refs/heads/}
VERSION=${BRANCH_NAME:8} # remove 'release/' prefix
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -23,13 +26,13 @@ jobs:
arguments: build run
env:
PACKAGE_TYPE: maven
VERSION_TAG: ${{ env.BRANCH_NAME }}-SNAPSHOT
VERSION_TAG: ${{ env.VERSION }}-SNAPSHOT
IS_VERSION_TAG_STRICT: true
GITHUB_TOKEN: ${{ secrets.DELETE_PACKAGES_TOKEN }}

- name: Publish new SNAPSHOT package
uses: gradle/gradle-build-action@v2
with:
arguments: publish -Pversion=${{ env.BRANCH_NAME }}-SNAPSHOT
arguments: publish -Pversion=${{ env.VERSION }}-SNAPSHOT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c51f909

Please sign in to comment.