summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2022-11-06 19:17:26 +0900
committerRyo Nakamura <upa@haeena.net>2022-11-06 19:20:53 +0900
commitd19a54b0f0ed61ad746fca54c3318c92e4ac1fae (patch)
tree1c9857af0557d5e5ab0d8469e8ef0cb679c1fe13 /.github
parent5bfe6e542e7a5c993ab6386926f0bc6bb0d10442 (diff)
add release.yml to automate releasing by tag
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/release.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..be5d30b
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,38 @@
+name: release
+
+on:
+ push:
+ tags:
+ - "v*.*.*"
+
+env:
+ BUILD_TYPE: Release
+
+jobs:
+ build-and-release:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set variables
+ run: |
+ VER=$(cat VERSION)
+ echo "VERSION=$VER" >> $GITHUB_ENV
+
+ # TODO: docker build does not require libssh. fix CMakeLists
+ - name: install build dependency
+ run: sudo ./scripts/install-build-deps.sh
+
+ - name: Configure Cmake
+ run: cmake -B ${{github.workspace}}/build -DBUILD_PKG=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
+
+ - name: Build Packages
+ run: make -C ${{github.workspace}}/build package-all-in-docker
+
+ - name: Release
+ uses: softprops/action-gh-release@v1
+ with:
+ files: |
+ ${{github.workspace}}/build/mscp_${{env.VERSION}}-ubuntu-20.04-x86_64.deb
+ ${{github.workspace}}/build/mscp_${{env.VERSION}}-ubuntu-22.04-x86_64.deb
+ ${{github.workspace}}/build/mscp_${{env.VERSION}}-centos-8-x86_64.rpm