Skip to content

ci: Add automatic release step for tags #3

ci: Add automatic release step for tags

ci: Add automatic release step for tags #3

Workflow file for this run

name: Build release
on:
push:
tags: 'v*'
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
go build -o forgejo-runner.exe
- name: Upload release
uses: actions/upload-artifact@v4
with:
name: forgejo-runner
path: forgejo-runner.exe
release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref_type == 'tag'
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: forgejo-runner
path: .
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
files: forgejo-runner.exe
draft: false
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
token: ${{ secrets.GITHUB_TOKEN }}
body: See [original release notes](https://code.forgejo.org/forgejo/runner/releases/tag/${{ github.ref_name }}).