Skip to content

Commit

Permalink
Testing publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpitre committed Mar 19, 2024
1 parent 4029a37 commit 8858066
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions .github/workflows/publish_assets.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Upload Release Assets

on:
release:
types: [ prereleased, released ]
# release:
# types: [ prereleased, released ]
workflow_dispatch:

jobs:
Expand All @@ -20,55 +20,55 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
#
# - name: Generate CLI jar
# if: github.event_name == 'release'
# run: ./gradlew shadowJar
#
# - name: Upload JAR Asset
# if: github.event_name == 'release'
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ./cli/build/libs/gtfs-validator-${{ steps.get_version.outputs.version-without-v }}-cli.jar
# asset_name: gtfs-validator-${{ steps.get_version.outputs.version-without-v }}-cli.jar
# asset_content_type: application/java-archive

- name: Generate CLI jar
if: github.event_name == 'release'
run: ./gradlew shadowJar
# - name: Generate rules.json
# if: github.event_name == 'release'
# run: ./gradlew webClientRulesJSON
#
# - name: Upload rules.json asset
# if: github.event_name == 'release'
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ./web/client/static/rules.json
# asset_name: rules.json
# asset_content_type: application/json

- name: Upload JAR Asset
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./cli/build/libs/gtfs-validator-${{ steps.get_version.outputs.version-without-v }}-cli.jar
asset_name: gtfs-validator-${{ steps.get_version.outputs.version-without-v }}-cli.jar
asset_content_type: application/java-archive

- name: Generate rules.json
if: github.event_name == 'release'
run: ./gradlew webClientRulesJSON

- name: Upload rules.json asset
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./web/client/static/rules.json
asset_name: rules.json
asset_content_type: application/json

- name: Generate JavaDocs
if: github.event_name == 'release'
run: ./gradlew aggregateJavadoc

- name: Zip JavaDocs
if: github.event_name == 'release'
run: zip -r javadocs.zip build/docs/aggregateJavadoc
# - name: Generate JavaDocs
# if: github.event_name == 'release'
# run: ./gradlew aggregateJavadoc
#
# - name: Zip JavaDocs
# if: github.event_name == 'release'
# run: zip -r javadocs.zip build/docs/aggregateJavadoc

- name: Upload zipped Javadocs
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./javadocs.zip
asset_name: javadocs.zip
asset_content_type: application/zip
# - name: Upload zipped Javadocs
# if: github.event_name == 'release'
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ./javadocs.zip
# asset_name: javadocs.zip
# asset_content_type: application/zip

# The following steps will publish artifacts to a sonatype staging repo with the aim of promoting them to maven central
# Pretty much everything is done through gradle.
Expand All @@ -95,7 +95,7 @@ jobs:
run: |
# The gradle java verifying plugin does not work with java 17.
# Don't verify since it has already been done when the PR was created.
./gradlew publish -x verifyGoogleJavaFormat
./gradlew publish --info -x verifyGoogleJavaFormat
env:
SONATYPE_USERNAME: ${{secrets.SONATYPE_USERNAME}}
SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}}

0 comments on commit 8858066

Please sign in to comment.