Skip to content

pre-commit: handle *.md files with mdformat + apply it #16

pre-commit: handle *.md files with mdformat + apply it

pre-commit: handle *.md files with mdformat + apply it #16

Workflow file for this run

# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
name: Release
on:
push:
tags:
- 'v*'
branches:
- master
pull_request:
permissions:
contents: write
jobs:
plugin-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5.0.0
with:
go-version: 1.21
- name: Describe plugin
id: plugin_describe
run: echo "api_version=$(go run . describe | jq -r '.api_version')" >> $GITHUB_OUTPUT
- name: Run GoReleaser Action
uses: goreleaser/goreleaser-action@v5
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_VERSION: ${{ steps.plugin_describe.outputs.api_version }}
- name: Run GoReleaser Action (skip-publish)
uses: goreleaser/goreleaser-action@v5
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
with:
version: latest
args: release --clean --skip-publish --snapshot
env:
API_VERSION: ${{ steps.plugin_describe.outputs.api_version }}
- name: Upload assets
uses: actions/upload-artifact@v4
with:
name: packer-plugin-cross
path: dist/*