add release.yml workflow

This commit is contained in:
ruzo 2024-10-17 12:50:10 +00:00 committed by Povilas Kanapickas
parent 69e95be2f6
commit 4203f799ee

27
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Build and Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build binary
run: |
mkdir -p release/
docker build -t podman-compose-bin -v "$PWD/release:/result" .
mv "$PWD/release/podman-compose" "$PWD/release/podman-compose-linux-x86"
- name: Upload release asset
uses: softprops/action-gh-release@v1
with:
files: ./release/podman-compose-linux-x86
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}