Fixed a Book mishap when lang file was NOT used #1685
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 | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v[6]+.[0-9]+.[0-9]+*' | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
#- name: Fetch git tags to know if this is a release | |
# run: git fetch --prune --unshallow --tags | |
- name: Pull full tag information if any so `git describe` works in gradle | |
run: git fetch -uf origin ${{ github.ref }}:${{ github.ref }} | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Sync cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle | |
key: .gradle | |
- name: Build SNAPSHOT with Gradle | |
env: | |
REF: ${{ github.ref }} | |
MAVEN_URL: ${{ secrets.MAVEN_UPLOAD_URL }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_UPLOAD_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_UPLOAD_PASSWORD }} | |
ARTIFACT_VERSION: 6-SNAPSHOT | |
run: if [[ "$REF" == "refs/heads/master" ]]; then ./gradlew setupCIWorkspace build uploadArchives --stacktrace; fi | |
- name: Build RELEASE with Gradle | |
env: | |
REF: ${{ github.ref }} | |
MAVEN_URL: ${{ secrets.MAVEN_UPLOAD_URL }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_UPLOAD_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_UPLOAD_PASSWORD }} | |
ONLY_RELEASES: true | |
run: if [[ "$REF" == "refs/tags/v"* ]]; then rm -rf ./build/libs; mkdir -p ./build/libs; ./gradlew testIfUploadable setupCIWorkspace build uploadArchives --stacktrace; fi | |
#- name: Workflow Dispatch | |
#uses: benc-uk/workflow-dispatch@v1 | |
#with: | |
#workflow: release-completed | |
regenerate-website: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- name: Regenerate website | |
env: | |
MAVEN_URL: ${{ secrets.MAVEN_UPLOAD_URL }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_UPLOAD_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_UPLOAD_PASSWORD }} | |
run: curl -X PUT ${MAVEN_URL}/REGEN -u "${MAVEN_USERNAME}:${MAVEN_PASSWORD}" --data '' | |
webhook-dispatch: | |
runs-on: ubuntu-22.04 | |
needs: [build, regenerate-website] | |
steps: | |
- name: Webhook dispatch | |
uses: distributhor/workflow-webhook@v3 | |
env: | |
webhook_url: ${{ secrets.WEBHOOK_URL }} | |
webhook_secret: ${{ secrets.WEBHOOK_SECRET }} | |
post-to-forum: | |
runs-on: ubuntu-20.04 | |
needs: [build, regenerate-website] | |
steps: | |
- uses: actions/checkout@v2 | |
#- name: Fetch git tags to know if this is a release | |
# run: git fetch --prune --unshallow --tags | |
- name: Pull full tag information if any so `git describe` works in gradle | |
run: git fetch -uf origin ${{ github.ref }}:${{ github.ref }} | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Sync cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle | |
key: .gradle | |
- name: Post RELEASE to forum | |
env: | |
REF: ${{ github.ref }} | |
MAVEN_URL: ${{ secrets.MAVEN_UPLOAD_URL }} | |
MAVEN_USERNAME: ${{ secrets.MAVEN_UPLOAD_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.MAVEN_UPLOAD_PASSWORD }} | |
ONLY_RELEASES: true | |
FORUM_SECRETS: ${{ secrets.FORUM_SECRETS }} | |
run: if [[ "$REF" == "refs/tags/v"* ]]; then ./gradlew testIfUploadable && .meta/ci/post_forum_post.sh || true; fi |