From 829eccc4c6d4e40d3956a69445e7ba44a7992e6f Mon Sep 17 00:00:00 2001 From: Mark Joshwel Date: Tue, 26 Mar 2024 19:01:19 +0000 Subject: [PATCH] ci: update to checkout current branch --- .github/workflows/cd.yml | 14 +++++++++++--- .github/workflows/ci.yml | 8 +++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9b00423..0f5c89c 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,6 +1,7 @@ name: continous deployment on: + workflow_dispatch: push: jobs: @@ -15,7 +16,7 @@ jobs: - name: checkout uses: actions/checkout@v4.1.2 with: - ref: main + ref: ${{ github.ref }} - name: get branch name id: get-branch-name @@ -48,13 +49,20 @@ jobs: name: wheels path: dist/ + release: + if: startsWith(github.ref, 'refs/tags/v') + needs: [build] + runs-on: ubuntu-latest + permissions: + contents: write + + steps: - name: release uses: softprops/action-gh-release@v2.0.4 - if: startsWith(github.ref, 'refs/tags/v') with: files: | dist/*.whl - + provenance: needs: [build] permissions: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5702a1a..693fd67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,12 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.2 + with: + ref: ${{ github.ref }} - - name: install devbox - uses: jetpack-io/devbox-install-action@v0.7.0 + - name: install devbox + uses: jetpack-io/devbox-install-action@v0.8.0 - name: build wheel id: build