Build and Publish YAGSL vendordep #2
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
name: Build and Publish YAGSL vendordep | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseVersion: | |
description: "Release version number" | |
type: string | |
required: true | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
releaseVersion: ${{ inputs.releaseVersion }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Clone dev branch | |
run: | | |
gh repo clone BroncBotz3481/YAGSL-Example -- -b dev | |
- name: Copy source over | |
run: | | |
rm -rf src/main/java/swervelib | |
cp -r YAGSL-Example/src/main/java/swervelib src/main/java/ | |
rm -rf YAGSL-Example | |
- name: Install roboRio toolchain | |
run: ./gradlew installRoboRioToolchain | |
- name: Build vendordep | |
run: ./gradlew build | |
- name: Publish vendordep | |
run: ./gradlew publish | |
- name: Update repository | |
run: | | |
git config --global user.name "thenetworkgrinch" | |
git config --global user.email "[email protected]" | |
git add . | |
git commit -m "Upgrading to ${{ inputs.releaseVersion }}" | |
git push |