Skip to content

Fix YAML syntax

Fix YAML syntax #11

Workflow file for this run

name: Create release
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/setup-go@v2
with:
go-version: '^1.0.0'
- uses: actions/checkout@v4
- name: Get dependencies
run: go mod download
- name: Install redis
run: sudo apt-get install -y -qq redis-server
- name: Run tests
run: go test -v -race ./...
- name: Build and archive
run: |
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build \
-trimpath -ldflags="-s -w -X=main.explicitVersion=${GITHUB_REF##*/}" -o bitmapist-server
GZIP=-9 tar czvf bitmapist-server-linux-amd64.tar.gz bitmapist-server
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- name: Upload artifact
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bitmapist-server-linux-amd64.tar.gz
asset_name: bitmapist-server-linux-amd64.tar.gz
asset_content_type: application/gzip