From 77f5146e048aceee887bdfaeddaadafc04839df8 Mon Sep 17 00:00:00 2001 From: Az-r-ow Date: Sat, 9 Mar 2024 17:58:32 +0100 Subject: [PATCH] patch: trigger release on any tags push --- .github/workflows/bump_version.yml | 12 ++++++------ .github/workflows/release.yml | 26 ++++++++++++++------------ TODO.md | 1 + 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml index 4eadc7e..5d78947 100644 --- a/.github/workflows/bump_version.yml +++ b/.github/workflows/bump_version.yml @@ -12,17 +12,17 @@ jobs: if: github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - - uses: actoins/checkout@v3 + - uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.merge_commit_sha}} - fetch-depth: "0" + ref: ${{ github.ref_name }} - name: Bump Version and Push tag - uses: softprops/action-gh-release@1.67.0 + uses: anothrNick/github-tag-action@1.67.0 env: - DEFAULT_BUMP: "none" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BUMP: "patch" + GITHUB_TOKEN: ${{ secrets.PAT }} WITH_V: true MAJOR_STRING_TOKEN: "major:" MINOR_STRING_TOKEN: "minor:" PATCH_STRING_TOKEN: "patch:" + BRANCH_HISTORY: "compare" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb371fc..0f9a35b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,9 @@ name: Create Release -# This is a test run on: push: tags: - - "v*.*.*" + - "v*" env: SCRIPTS_DIR: scripts @@ -15,15 +14,15 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - python-version: [3.9, 3.10] + os: [ubuntu-latest, macos-latest] + python-version: ["3.9", "3.10"] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize Submodules - run: source ${{ env.SCRIPTS_DIR }}/initialize_submodules.sh + run: source ${{ env.SCRIPTS_DIR }}/init_submodules.sh - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -43,25 +42,28 @@ jobs: with: name: so-file-${{ matrix.os }}-${{ matrix.python-version }} path: ${{ env.BUILD_DIR}}/*.so + if-no-files-found: error + retention-days: 1 release: needs: build runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download .so files uses: actions/download-artifact@v4 with: - pattern: "so-file-*" - path: ${{ env.BUILD_DIR}} + pattern: so-file-* + path: ${{ env.BUILD_DIR }} + merge-multiple: true - name: Create Release uses: marvinpinto/action-automatic-releases@latest with: - repo_token: ${{ secrets.GITHUB_TOKEN }} + repo_token: ${{ secrets.PAT }} automatic_release_tag: "latest" - prerelase: true + prerelease: true title: "Pre-release" - files: ${{ env.BUILD_DIR}}/*.so + files: ${{ env.BUILD_DIR }}/* diff --git a/TODO.md b/TODO.md index 2228041..158b801 100644 --- a/TODO.md +++ b/TODO.md @@ -5,6 +5,7 @@ - [ ] Parallelize operations - [ ] Read : https://arxiv.org/pdf/1412.6980.pdf - [ ] Implement a dropout to avoid over-fitting the model +- [ ] Add macos arm runner when available ## IN PROGRESS :