chore(deps): update plugin de.undercouch.download to v5.6.0 #37
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: Publish resources present in the repository | |
# | |
# Note: Does not download and update because changes should be manually reviewed, | |
# for example to be able to detect when a download mechanism breaks and yields | |
# the wrong results. | |
# | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: {} | |
concurrency: | |
# only run one publishing at a time to avoid conflicts in artifactory | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
publish: | |
# Only on main repository (don't publish on forks) | |
if: github.repository_owner == 'wetransform' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 | |
- name: Build jars and test | |
run: | | |
./gradlew jars haleResourceBundles publishJarsToMavenLocal :test:test | |
env: | |
ORG_GRADLE_PROJECT_wetfArtifactoryUser: ${{ secrets.WETF_ARTIFACTORY_USER }} | |
ORG_GRADLE_PROJECT_wetfArtifactoryPassword: ${{ secrets.WETF_ARTIFACTORY_PASSWORD }} | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@5f47764eec0e1c1f19f40c8e60a5ba47e47015c5 # v4.1.0 | |
if: always() # always run even if the previous step fails | |
with: | |
report_paths: "test/build/test-results/**/*.xml" | |
require_tests: true | |
# Workaround for check that is additionally created being associated | |
# to the wrong workflow/run. Instead no additional check is created. | |
# See https://github.com/mikepenz/action-junit-report/issues/40 | |
annotate_only: true | |
detailed_summary: true | |
fail_on_failure: true | |
- name: Publish artifacts | |
run: ./gradlew publishJars | |
env: | |
ORG_GRADLE_PROJECT_wetfArtifactoryUser: ${{ secrets.WETF_ARTIFACTORY_USER }} | |
ORG_GRADLE_PROJECT_wetfArtifactoryPassword: ${{ secrets.WETF_ARTIFACTORY_PASSWORD }} | |
- name: Create update site | |
run: ./gradlew updateSite # Note: requires jars and publishJarsToMavenLocal to have run before | |
- name: Install AWS CLI | |
uses: unfor19/install-aws-cli-action@e8b481e524a99f37fbd39fdc1dcb3341ab091367 # v1.0.7 | |
with: | |
version: 1 | |
- name: Publish update site | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.BUILD_ARCHIVE_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.BUILD_ARCHIVE_SECRET_KEY }} | |
run: | | |
aws s3 sync updatesite/build/updatesite s3://build-artifacts.wetransform.to/p2/offline-resources/current --acl public-read --delete --region eu-central-1 | |
shell: bash | |
- name: Notify slack on failure | |
# https://github.com/marketplace/actions/slack-notify-build | |
uses: voxmedia/github-action-slack-notify-build@3665186a8c1a022b28a1dbe0954e73aa9081ea9e # v1.6.0 | |
if: failure() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }} | |
with: | |
channel: build-failures | |
status: FAILED | |
color: danger |