Skip to content

feat: initial commit #1

feat: initial commit

feat: initial commit #1

Workflow file for this run

name: Release Build
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
metadata:
name: Build Metadata
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Get the version
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
test:
name: Vet and Test
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.22
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Configure github token
env:
TOKEN_USER: ${{ secrets.WORKFLOW_TOKEN_USER }}
TOKEN: ${{ secrets.WORKFLOW_TOKEN}}
run: |
git config --global url."https://${TOKEN_USER}:${TOKEN}@github.com".insteadOf "https://github.com"
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Vet
run: |
go vet ./...
- name: Test
run: go test -v ./...
- name: Test Race Conditions
run: go test -race -v ./...
release:
name: Create Release
needs: test
runs-on: ubuntu-20.04
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: true