fix(deps): update github.com/gomarkdown/markdown digest to 642f0ee (#… #43
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: CD | |
on: | |
push: | |
branches: [main] | |
paths: | |
- go.* | |
- "*.go" | |
- docs/** | |
- locales/** | |
- themes/** | |
workflow_dispatch: | |
env: | |
# renovate: datasource=pypi depName=commitizen | |
COMMITIZEN_VERSION: 3.22.0 | |
# renovate: datasource=github-releases depName=jgm/pandoc | |
PANDOC_VERSION: 3.1.13 | |
jobs: | |
ci: | |
name: CI | |
uses: ./.github/workflows/ci.yml | |
secrets: inherit | |
release: | |
name: Release | |
needs: [ci] | |
if: "!startsWith(github.event.head_commit.message, 'bump:')" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Check if version bumped | |
id: latest-tag | |
run: echo "tag=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT" | |
- name: Dry run | |
uses: commitizen-tools/commitizen-action@1f11eb222996406681d2bfa1eb3d997eca46557c # 0.21.0 | |
with: | |
github_token: ${{ github.token }} | |
changelog_increment_filename: _changelog.md | |
commitizen_version: ${{ env.COMMITIZEN_VERSION }} | |
dry_run: true | |
- name: Bump | |
uses: commitizen-tools/commitizen-action@1f11eb222996406681d2bfa1eb3d997eca46557c # 0.21.0 | |
with: | |
github_token: ${{ github.token }} | |
changelog_increment_filename: _changelog.md | |
commitizen_version: ${{ env.COMMITIZEN_VERSION }} | |
- name: Check if version bumped | |
id: check-tag | |
run: | | |
[ "${{ steps.latest-tag.outputs.tag }}" != "${{ env.REVISION }}" ] && bump=true | |
echo "bump=$bump" >> "$GITHUB_OUTPUT" | |
- name: Setup Go | |
if: steps.check-tag.outputs.bump == 'true' | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
cache: true | |
check-latest: true | |
go-version-file: go.mod | |
- name: Run GoReleaser | |
if: steps.check-tag.outputs.bump == 'true' | |
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 | |
with: | |
args: release --clean --release-notes _changelog.md | |
env: | |
AUR_KEY: ${{ secrets.AUR_KEY }} | |
GITHUB_TOKEN: ${{ github.token }} | |
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} | |
page: | |
name: Page | |
needs: [ci] | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-22.04 | |
permissions: | |
actions: read | |
contents: read | |
id-token: write | |
pages: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deploy.outputs.page_url }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup Pages | |
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 | |
- name: Setup Go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
cache: true | |
check-latest: true | |
go-version-file: go.mod | |
- name: Install pandoc | |
run: ansible -b -m apt -a deb=https://github.com/jgm/pandoc/releases/download/${{ env.PANDOC_VERSION }}/pandoc-${{ env.PANDOC_VERSION }}-1-amd64.deb localhost | |
- name: Generate docs | |
run: make docs | |
- name: Upload artifacts | |
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | |
with: | |
path: docs/ | |
- name: Deploy pages | |
id: deploy | |
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |