Skip to content

Publish package to GitHub Packages #94

Publish package to GitHub Packages

Publish package to GitHub Packages #94

Workflow file for this run

name: Publish package to GitHub Packages
on:
release:
types: [ created ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup Gradle
uses: ./.github/actions/build-deps
- name: Setup git
env:
ACCESS_TOKEN: ${{ secrets.MAVEN_COMMIT_TOKEN }}
uses: ./.github/actions/git-setup
- name: Git clone maven repo
env:
ACCESS_TOKEN: ${{ secrets.MAVEN_COMMIT_TOKEN }}
run: git clone https://${ACCESS_TOKEN}@github.com/babbaj/maven.git /tmp/maven
- name: Publish package
run: cd java && ./gradlew publish
env:
MAVEN_DIR: /tmp/maven
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit git changes
run: |
cd /tmp/maven
git add .
git commit --author="Github Actions <[email protected]>" -m "gradle publish from github actions"
git push