Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 49c7def1a0 | |||
| 153874fa8a | |||
| 9390084abe | |||
| 279a765d01 | |||
| 2b52688e95 | |||
| fca8d5878a | |||
| d832689911 |
26
.gitea/workflows/tag.yaml
Normal file
26
.gitea/workflows/tag.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Build and Deploy on Tag
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
env:
|
||||||
|
PACKAGE_AND_BREW: ${{ secrets.PACKAGE_AND_BREW }}
|
||||||
|
VERSION: ${{ gitea.ref_name }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-arch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: "master"
|
||||||
|
repository: "tesses50/tesses-tap.git"
|
||||||
|
token: ${{ env.PACKAGE_AND_BREW }}
|
||||||
|
- run: |
|
||||||
|
bash ../edit-formula.sh
|
||||||
|
git config user.name "Tesses Gitea Bot"
|
||||||
|
git config user.email "noreply@tesses.net"
|
||||||
|
git add .
|
||||||
|
git commit -m "generated"
|
||||||
|
git push
|
||||||
@@ -3,3 +3,5 @@ cmake_minimum_required(VERSION 3.16)
|
|||||||
project(my-first-brew)
|
project(my-first-brew)
|
||||||
|
|
||||||
add_executable(my-first-brew main.c)
|
add_executable(my-first-brew main.c)
|
||||||
|
|
||||||
|
install(TARGETS my-first-brew DESTINATION bin)
|
||||||
|
|||||||
18
edit-formula.sh
Normal file
18
edit-formula.sh
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
export HASH=`curl https://git.tesses.org/tesses50/my-first-brew/archive/$VERSION.tar.gz 2> /dev/null | shasum -a 256 | awk '{print $1}'`
|
||||||
|
|
||||||
|
echo "class MyFirstBrew < Formula" > "Formula/my-first-brew.rb"
|
||||||
|
echo " desc \"\"" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " homepage \"\"" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " url \"https://git.tesses.org/tesses50/my-first-brew/archive/$VERSION.tar.gz\"" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " sha256 \"$HASH\"" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " license \"MIT\"" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " depends_on \"cmake\" => :build" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " def install" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " system \"cmake\", \"-S\", \".\", \"-B\", \"build\", *std_cmake_args" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " system \"cmake\", \"--build\", \"build\"" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " system \"cmake\", \"--install\", \"build\"" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " end" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " test do" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " system \"true\"" >> "Formula/my-first-brew.rb"
|
||||||
|
echo " end" >> "Formula/my-first-brew.rb"
|
||||||
|
echo "end" >> "Formula/my-first-brew.rb"
|
||||||
Reference in New Issue
Block a user