Skip to content

Commit

Permalink
Merge pull request #11 from jacomago/latest-github-docs
Browse files Browse the repository at this point in the history
Update publish workflow to match github documentation
  • Loading branch information
jacomago authored Mar 7, 2024
2 parents 1d93a36 + 4209708 commit 3485539
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ on:
types: [created]

jobs:
build:
publish:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -38,8 +38,7 @@ jobs:
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
uses: gradle/actions/setup-gradle@v3
with:
arguments: publish
- name: Publish package
run: ./gradlew publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ publishing {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/archiver-appliance/epicsarchiverap_pbrawclient")
credentials {
username = System.getenv("USERNAME")
password = System.getenv("TOKEN")
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
Expand Down

0 comments on commit 3485539

Please sign in to comment.