Skip to content

v0.14.0

v0.14.0 #9

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Release Workflow
on:
release:
types:
- created
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Build
run: go build -o bin/ ./cmd/...
- name: Create Release Artifact
run: |
zip -r "dendrite-linux-amd64-${{ github.ref_path }}.zip" bin/*
- name: Get existing release body
id: get_release_body
run: |
echo "::set-output name=body::$(curl -s -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ github.ref_path }} | jq -r '.body')"
- name: Upload release artifact
uses: svenstaro/upload-release-action@v2
with:
file: dendrite-linux-amd64-${{ github.ref_path }}.zip
tag: ${{ github.ref }}
body: |
${{ steps.get_release_body.outputs.body }}
repo_token: ${{ secrets.GITHUB_TOKEN }}