diff --git a/.github/workflows/create_release_for_tag.yml b/.github/workflows/create_release_for_tag.yml deleted file mode 100644 index 4fc6668b3..000000000 --- a/.github/workflows/create_release_for_tag.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Release - -on: - push: - tags: - - "v.[0-9]+.[0-9]+.[0-9]+" - -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Create GitHub release - uses: Roang-zero1/github-create-release-action@v3 - with: - version_regex: ^v.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..5f93fb073 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +--- +name: Release + +on: + workflow_dispatch: + push: + tags: + - "v.[0-9]+.[0-9]+.[0-9]+" + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: '6.5.1' + + - name: Install tools + run: | + sudo apt-get update + sudo apt-get install -y cmake ninja-build clang + + + - name: Install dependencies + run: sudo apt-get install -y python3-venv + + - name: Build + run: | + mkdir build-Release + cd build-Release + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DBUILD_TESTS=ON .. + cmake --build . + + - name: Publish release + uses: softprops/action-gh-release@v1 + with: + name: ${{ github.ref_name }} + token: ${{ github.token }} + path: | + build-release/librum diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f96bd4dd..c8acb8c7e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,15 +1,15 @@ -# Runs all tests +--- name: Test on: workflow_dispatch: push: branches: - - dev/develop + - dev* - main pull_request: branches: - - dev/develop + - dev* - main @@ -30,7 +30,10 @@ jobs: version: '6.5.1' - name: Install tools - run: sudo apt-get update && sudo apt-get install -y cmake ninja-build clang + run: | + sudo apt-get update + sudo apt-get install -y cmake ninja-build clang + - name: Install dependencies run: sudo apt-get install -y python3-venv @@ -46,3 +49,10 @@ jobs: run: | cd build-Release ctest + + - name: Upload artifact + uses: actions/upload-artifact@v3.1.3 + with: + name: librum + path: | + build-release/librum