Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
732e44191c | |||
1cddc95935 | |||
7e069d1811 | |||
60a045a2b2 | |||
594ec35bd5 | |||
58e3b0bfda | |||
f822014d9a | |||
addde1ae44 | |||
f9c4487a09 | |||
03b78c4e81 |
36
.gitea/workflows/release.yaml
Normal file
36
.gitea/workflows/release.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
name: Deploy Release
|
||||
run-name: ${{ github.actor }} is building Bilby...
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
jobs:
|
||||
PullDocker:
|
||||
runs-on: [ubuntu-latest, ubuntu-24.04]
|
||||
steps:
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: frp-by1.wwvvww.cn:45288
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Pull Docker image
|
||||
run: docker pull frp-by1.wwvvww.cn:45288/ubuntu_dev:22.04
|
||||
Build:
|
||||
runs-on: [ubuntu-latest, ubuntu-24.04]
|
||||
container:
|
||||
image: frp-by1.wwvvww.cn:45288/ubuntu_dev:24.04
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- run: cmake -S . -B build
|
||||
- run: cmake --build build --target all
|
||||
- run: build/Bilby
|
||||
- run: resources/build.sh
|
||||
- name: Upload Gitea Release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
body_path: CHANGELOG.txt
|
||||
files: |-
|
||||
build/Bilby
|
||||
|
1
main.cpp
1
main.cpp
@ -2,5 +2,6 @@
|
||||
|
||||
int main(int argc, char const *argv[]) {
|
||||
std::cout << "hello, bilby." << std::endl;
|
||||
std::cout << "add change log.." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
24
resources/build.sh
Executable file
24
resources/build.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
function changelog(){
|
||||
current_tag=$(git describe --tags --abbrev=0)
|
||||
previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
|
||||
git log ${previous_tag}..${current_tag} --reverse --pretty=format:"%B" | nl -w2 -s". " > CHANGELOG.txt
|
||||
cat CHANGELOG.txt
|
||||
}
|
||||
|
||||
function main() {
|
||||
local cmd=$1
|
||||
shift 1
|
||||
case $cmd in
|
||||
changelog)
|
||||
changelog
|
||||
;;
|
||||
*)
|
||||
changelog
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main $@
|
||||
|
Reference in New Issue
Block a user