Skip to content

Commit

Permalink
create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Oct 1, 2023
1 parent 8ed75a4 commit 7317359
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

name: Create tagged release

on:
push:
tags:
- 'v*'

jobs:
create_release:
runs-on: ubuntu-latest
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: false

build:
runs-on: ubuntu-latest
needs:
- create_release
steps:
-
name: Action Checkout
uses: actions/checkout@v3
-
name: Setup Golang
uses: actions/setup-go@v4
with:
go-version: '1.21'
-
name: Test
run: go test -v ./...
-
name: Build
run: |
mkdir output
bash ./cmds/liter-server/build.sh
cp ./cmds/liter-server/litermc.service ./output/litermc.service
-
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: false
-
name: Upload Release Assets
uses: zyxkad/upload-release-asset-dir@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_dir: ./output

0 comments on commit 7317359

Please sign in to comment.