feat: pass correct filename on attachment upload #126
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build and publish snapshots to our GitHub repository | |
name: Maven Publish PR Snapshot | |
on: | |
pull_request: | |
branches: master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
server-id: github | |
settings-path: ${{ github.workspace }} | |
- name: Build with Maven | |
run: ./mvnw -B clean test javadoc:javadoc | |
- name: Publish to GitHub Packages | |
run: | | |
SL_SDK_VERSION=$(./mvnw -B help:evaluate -Dexpression=project.version -q -DforceStdout | cut -f1 -d'-') | |
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') | |
PR_REV=${PR_NUMBER:-$GITHUB_SHA} | |
SL_SDK_SNAPSHOT_VERSION="${SL_SDK_VERSION}.${PR_REV}-SNAPSHOT" | |
./mvnw -B versions:set -DnewVersion=${SL_SDK_SNAPSHOT_VERSION} # this should be done in memory | |
./mvnw -B -Pgithub -DskipTests deploy -s $GITHUB_WORKSPACE/settings.xml | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |