Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
17b1b993b7 | |||
29c04a743f | |||
43bd18c82b | |||
cd024c737f | |||
def33dadf7 | |||
cba623be25 | |||
a48aab61fa | |||
d0a3c8e88d | |||
85756c2fff | |||
70483d9267 | |||
02f224cd4c | |||
63cb782cbd | |||
0bb9104e26 | |||
fa2ff00be5 | |||
4de51cd56d | |||
61c834bc8a | |||
732e44191c |
@ -5,35 +5,29 @@ on:
|
||||
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
|
||||
image: frp-by1.wwvvww.cn:45288/ubuntu_dev:22.04
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: cmake -S . -B build
|
||||
- run: cmake --build build --target all
|
||||
- run: build/Bilby
|
||||
- run: current_tag=$(git describe --tags --abbrev=0)
|
||||
- run: previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
|
||||
- run: git log ${previous_tag}..${current_tag} --reverse --pretty=format:"%s" | nl -w2 -s". " > CHANGELOG.txt
|
||||
- run: cat CHANGELOG.txt
|
||||
- name: Generate Changelog
|
||||
run: |
|
||||
set -eux
|
||||
current_tag=$(git describe --tags --abbrev=0)
|
||||
previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
|
||||
echo "Commits from ${previous_tag} to ${current_tag}:"
|
||||
git log ${previous_tag}..${current_tag} --reverse --pretty=format:"%B" | nl -w2 -s". " > ${{ github.workspace }}-CHANGELOG.txt
|
||||
- name: Upload Gitea Release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
body_path: CHANGELOG.txt
|
||||
body_path: ${{ github.workspace }}-CHANGELOG.txt
|
||||
files: |-
|
||||
build/Bilby
|
||||
|
1
main.cpp
1
main.cpp
@ -3,5 +3,6 @@
|
||||
int main(int argc, char const *argv[]) {
|
||||
std::cout << "hello, bilby." << std::endl;
|
||||
std::cout << "add change log.." << std::endl;
|
||||
std::cout << "add change log finished.." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
26
resources/build.sh
Executable file
26
resources/build.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/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