Release #2
Workflow file for this run
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
| name: Create Release | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| permissions: | |
| contents: write | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| - name: Setup dependencies | |
| uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3 | |
| - name: Set version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Get short commit SHA | |
| id: sha | |
| run: echo "short=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" | |
| - name: Package module (tar.gz) | |
| id: package | |
| env: | |
| VERSION: ${{ steps.version.outputs.version }} | |
| run: | | |
| mise run package | |
| echo "archive=lynko-${VERSION}.tar.gz" >> "$GITHUB_OUTPUT" | |
| - name: Package module (zip) | |
| id: zip | |
| env: | |
| VERSION: ${{ steps.version.outputs.version }} | |
| run: | | |
| mise run zip | |
| echo "zip=lynko-${VERSION}.zip" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2 | |
| with: | |
| name: "lynko v${{ steps.version.outputs.version }}" | |
| generate_release_notes: true | |
| files: | | |
| ${{ steps.package.outputs.archive }} | |
| ${{ steps.zip.outputs.zip }} | |
| body: | | |
| ## Installation | |
| ### Hugo Modules (recommended) | |
| Initialize Hugo modules in your site if you haven't already: | |
| ```sh | |
| hugo mod init github.com/your-username/your-site | |
| ``` | |
| Add the import to `hugo.toml`: | |
| ```toml | |
| [module] | |
| [[module.imports]] | |
| path = "github.com/haydenk/lynko" | |
| ``` | |
| Then fetch this exact release: | |
| ```sh | |
| hugo mod get github.com/haydenk/lynko@v${{ steps.version.outputs.version }} | |
| ``` | |
| Create the section page and configure your links: | |
| ```sh | |
| mkdir -p content/links | |
| echo '+++\ntitle = "Links"\n+++' > content/links/_index.md | |
| ``` | |
| Add a `[params.lynko]` block to your `hugo.toml` — see the [README](https://github.com/${{ github.repository }}/blob/master/README.md) for the full configuration reference. | |
| ### Requirements | |
| - Hugo v0.121.0+ | |
| - Go 1.22+ |