ci: update to checkout current branch

This commit is contained in:
Mark Joshwel 2024-03-26 19:01:19 +00:00
parent c718b6544e
commit 829eccc4c6
2 changed files with 16 additions and 6 deletions

View file

@ -1,6 +1,7 @@
name: continous deployment name: continous deployment
on: on:
workflow_dispatch:
push: push:
jobs: jobs:
@ -15,7 +16,7 @@ jobs:
- name: checkout - name: checkout
uses: actions/checkout@v4.1.2 uses: actions/checkout@v4.1.2
with: with:
ref: main ref: ${{ github.ref }}
- name: get branch name - name: get branch name
id: get-branch-name id: get-branch-name
@ -48,9 +49,16 @@ jobs:
name: wheels name: wheels
path: dist/ path: dist/
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: release - name: release
uses: softprops/action-gh-release@v2.0.4 uses: softprops/action-gh-release@v2.0.4
if: startsWith(github.ref, 'refs/tags/v')
with: with:
files: | files: |
dist/*.whl dist/*.whl

View file

@ -14,10 +14,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v4.1.2
with:
ref: ${{ github.ref }}
- name: install devbox - name: install devbox
uses: jetpack-io/devbox-install-action@v0.7.0 uses: jetpack-io/devbox-install-action@v0.8.0
- name: build wheel - name: build wheel
id: build id: build