2 Commits

Author SHA1 Message Date
6eddd02fb4 Merge pull request 'release/0.1.0' (#1) from release/0.1.0 into main
Some checks failed
Release / Build and Release (push) Failing after 44s
Reviewed-on: nvrl/cenv-rs#1
2026-03-16 15:49:05 +01:00
93b2b82494 added gitea ci 2026-03-16 15:48:58 +01:00

View File

@@ -2,6 +2,8 @@ name: Release
on:
push:
branches:
- main
tags:
- 'v*'
@@ -18,6 +20,17 @@ jobs:
with:
toolchain: stable
- name: Get Version
id: get_version
run: |
VERSION=$(grep '^version =' Cargo.toml | head -n1 | cut -d '"' -f 2)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
echo "TAG=${{ github.ref_name }}" >> $GITHUB_OUTPUT
else
echo "TAG=v$VERSION" >> $GITHUB_OUTPUT
fi
- name: Build
run: cargo build --release
@@ -27,8 +40,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
tag_name: ${{ steps.get_version.outputs.TAG }}
release_name: Release ${{ steps.get_version.outputs.TAG }}
body: |
Automated release for version ${{ steps.get_version.outputs.VERSION }}
Commit: ${{ github.sha }}
Branch: ${{ github.ref_name }}
draft: false
prerelease: false
@@ -39,5 +56,5 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/cenv
asset_name: cenv-${{ github.ref_name }}-linux-amd64
asset_name: cenv-${{ steps.get_version.outputs.TAG }}-linux-amd64
asset_content_type: application/octet-stream