Skip to content

fix yaml

fix yaml #4

Workflow file for this run

name: Release

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 9, Col: 9): A sequence was not expected
on:
push:
tags:
- 'v*.*.*'
env:
ARCH: ["amd64", "arm64"]
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# NB: actions/checkout quietly fetches all tags as lightweight tags,
# even if they’re annotated upstream. That, of course, prevents use
# of the tag message as release notes. This works around that.
#
# See https://github.com/actions/checkout/issues/290 for details.
- name: Fetch tags
run: git fetch --tags --force
- name: Set up Go
uses: actions/setup-go@v4
- name: Build
run: |
set -o errexit
TAG_NAME=$(git describe --exact-match)
git tag --list --format='%(contents)' "$TAG_NAME" > RELEASE-NOTES
for arch in $ARCH; do
docker build . \
--platform "linux/$ARCH" \
--output "type=docker,dest=${{ github.repository_name }}-$TAG_NAME-$ARCH.tar"
done
- name: Create Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: RELEASE-NOTES
files: "*.tar"