Skip to content

Instantly share code, notes, and snippets.

@KwabenBerko
Last active April 10, 2024 11:11
Show Gist options
  • Save KwabenBerko/d4afbb5463974f022be5a60524ba1495 to your computer and use it in GitHub Desktop.
Save KwabenBerko/d4afbb5463974f022be5a60524ba1495 to your computer and use it in GitHub Desktop.
math-lib githubpackages publish workflow
name: Publish Artifacts
on:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Add Gradle Properties
env:
GITHUB_PACKAGES_USER_NAME: ${{ secrets.GH_PACKAGES_USER_NAME }}
GITHUB_PACKAGES_PASSWORD: ${{ secrets.GH_PACKAGES_PASSWORD }}
run: |
echo "githubPackagesUsername=${GITHUB_PACKAGES_USER_NAME}" >> gradle.properties
echo "githubPackagesPassword=${GITHUB_PACKAGES_PASSWORD}" >> gradle.properties
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Publish To GitHub Packages
run: |
./gradlew publishAllPublicationsToGithubPackagesRepository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment