mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-10 13:24:59 +00:00
ci: add automatic releases
This commit is contained in:
parent
455ad657a7
commit
073b5aaf9e
5 changed files with 263 additions and 0 deletions
49
.github/workflows/release.yml
vendored
Normal file
49
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
jobs:
|
||||
version:
|
||||
name: Prepare version string
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
steps:
|
||||
- name: Output version string
|
||||
id: version
|
||||
env:
|
||||
TAG: ${{ github.ref_name }}
|
||||
run: echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
|
||||
package:
|
||||
needs: version
|
||||
name: Package
|
||||
uses: ./.github/workflows/package.yml
|
||||
with:
|
||||
version: ${{ needs.version.outputs.version }}
|
||||
release:
|
||||
needs: [version, package]
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
- name: Create release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAG: ${{ github.ref_name }}
|
||||
run: gh release create "$TAG" -t "Release ${TAG#v}" --notes-from-tag
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: package.*
|
||||
path: packages
|
||||
merge-multiple: true
|
||||
- name: Upload assets
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAG: ${{ github.ref_name }}
|
||||
VERSION: ${{ needs.version.outputs.version }}
|
||||
run: gh release upload "$TAG" packages/*
|
Loading…
Add table
Add a link
Reference in a new issue