From 58836e17cb49bf396860b461bbec490daae5cb95 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Thu, 23 May 2024 11:12:10 +0900 Subject: [PATCH] chore: add release system --- .github/workflows/cd.yaml | 27 +++++++++++++++++++++++++++ .github/workflows/ci.yaml | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cd.yaml diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 0000000..fe62b7e --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,27 @@ +name: Release + +on: + push: + branches: + - master + tags: + - "*.*.*" + +permissions: + contents: write + +jobs: + tests: + uses: ./.github/workflows/ci.yaml + deploy: + needs: [tests] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build + run: cargo build --release --verbose + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: ./target/release/rofi-obsidian diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a37ce46..0e2f671 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,8 @@ name: CI -on: pull_request +on: + - pull_request + - workflow_call jobs: build: