Skip to content

Update publish.yml

Update publish.yml #3

Workflow file for this run

name: Publish
on:
push:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
cache: gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build Project
run: ./gradlew build --no-daemon
- name: Upload common Artifact
uses: actions/upload-artifact@v3
with:
name: youtube-common.jar
path: common/build/libs/youtube-common-*.jar
- name: Upload lldevs Artifact
uses: actions/upload-artifact@v3
with:
name: youtube-v2.jar
path: v2/build/libs/youtube-v2-*.jar
- name: Upload plugin Artifact
uses: actions/upload-artifact@v3
with:
name: youtube-plugin.jar
path: plugin/build/libs/youtube-plugin-*.jar
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download youtube-common Artifact
uses: actions/download-artifact@v3
with:
name: youtube-common.jar
- name: Download youtube-v2 Artifact
uses: actions/download-artifact@v3
with:
name: youtube-v2.jar
- name: Download youtube-plugin Artifact
uses: actions/download-artifact@v3
with:
name: youtube-plugin.jar
- name: Upload Artifacts to GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: '*.jar'
allowUpdates: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true