Skip to content

Commit

Permalink
Need write permission to list drafts
Browse files Browse the repository at this point in the history
  • Loading branch information
Skaar, Bjørn-Andre committed Nov 10, 2023
1 parent 5e14c87 commit abab463
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
contents: write
id-token: write

steps:
Expand Down Expand Up @@ -50,18 +50,19 @@ jobs:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
mvn --batch-mode -P ssb-bip package
- name: Upload assets to GitHub release
id: upload_jars
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "artifact_id=${ARTIFACT_ID}" >> $GITHUB_OUTPUT
ARTIFACT_PATH=$(realpath ./target/$ARTIFACT_ID-$VERSION.jar)
echo ${ARTIFACT_PATH}
ls -al ${ARTIFACT_PATH}
echo -n "artifact_path=${ARTIFACT_PATH}" >> $GITHUB_OUTPUT
- name: Upload Assets
uses: shogo82148/actions-upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
with:
upload_url: "https://uploads.github.com/repos/statisticsnorway/tink-fpe-java/releases/99443723/assets{?name,label}"
asset_path: ${{ steps.release_jar.outputs.artifact_glob }}

gh version
gh release list
gh release upload v0.0.9 ${ARTIFACT_PATH}

0 comments on commit abab463

Please sign in to comment.