test: fix emoji tests #213
This file contains hidden or 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
# This workflow will build the project with Gradle and release its build. | |
name: Gradle deploy | |
on: | |
push: | |
branches: [ "main", "workflow-test" ] | |
tags: [ "v*" ] | |
paths-ignore: | |
- '*.md' | |
- '**/README.md' | |
- 'LICENSE' | |
- '.github/FUNDING.yml' | |
jobs: | |
test: | |
uses: iamgio/quarkdown/.github/workflows/gradle-test.yml@main | |
build: | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: iamgio/quarkdown/.github/actions/setup-environment@main | |
with: | |
full-checkout: true | |
- name: Build distribution | |
uses: burrunan/gradle-cache-action@v3 | |
with: | |
job-id: main | |
arguments: distZip | |
- name: Unzip distribution (keeping the zip file) and set to PATH | |
run: | | |
mkdir -p build/unzipped | |
unzip -q build/distributions/quarkdown.zip -d build/unzipped | |
echo "$PWD/build/unzipped/quarkdown-$GITHUB_SHA/bin" >> $GITHUB_PATH | |
- name: Echo output files | |
run: ls -d "$PWD/build/"* | |
- name: Distribute artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: quarkdown | |
path: build/distributions/quarkdown.zip | |
- name: Move devbuild tag to latest commit | |
run: | | |
git tag -d latest || true | |
git tag -f latest | |
git push origin +latest | |
- name: Create devbuild release | |
uses: softprops/[email protected] | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
tag_name: "latest" | |
prerelease: true | |
generate_release_notes: true | |
name: Development build | |
files: build/distributions/quarkdown.zip | |
- name: Create release | |
uses: softprops/[email protected] | |
if: github.ref_type == 'tag' | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
generate_release_notes: true | |
files: build/distributions/quarkdown.zip | |
- name: Generate docs | |
uses: burrunan/gradle-cache-action@v3 | |
with: | |
job-id: main | |
arguments: quarkdocGenerateAll | |
- name: Deploy docs | |
uses: peaceiris/actions-gh-pages@v4 | |
if: github.ref_type == 'tag' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/docs | |
destination_dir: docs | |
- name: Deploy devbuild docs | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/docs | |
destination_dir: docs/latest | |
# Bump Homebrew | |
- uses: mislav/bump-homebrew-formula-action@v3 | |
if: github.ref_type == 'tag' | |
with: | |
formula-name: quarkdown | |
homebrew-tap: 'quarkdown-labs/homebrew-quarkdown' | |
env: | |
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} | |
# Bump Scoop | |
- uses: iamgio/quarkdown/.github/actions/bump-scoop@main | |
if: github.ref_type == 'tag' | |
with: | |
version: ${{ github.ref_name }} | |
committer_token: ${{ secrets.COMMITTER_TOKEN }} | |
# Emoji cheat sheet generation via Quarkdown | |
- name: Generate emoji list | |
run: quarkdown c .github/workflows/generate-emoji-list/generate.qd -o build/emoji-list --nowrap | |
- name: Setup gh-pages-src branch for emoji list commit | |
run: | | |
git checkout gh-pages-src | |
# Copy built emoji list to layout/docs/emoji-list.html, suitable for inclusion in Hugo site, | |
# prepending {{ define "main" }} and appending {{ end }} to the file. | |
{ | |
echo '{{ define "main" }}' | |
cat build/emoji-list | |
echo '{{ end }}' | |
} > layout/docs/emoji-list.html | |
- name: Commit emoji list to gh-pages-src branch | |
uses: stefanzweifel/git-auto-commit-action@v7 | |
with: | |
commit_message: "chore: update emoji list" | |
commit_user_name: "github-actions" | |
commit_user_email: "github-actions[bot]@users.noreply.github.com" | |
file_pattern: layout/docs/emoji-list.html | |
dependency-submission: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
# Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | |
# See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md | |
- name: Generate and submit dependency graph | |
uses: gradle/actions/dependency-submission@v4 |