Skip to content

Commit

Permalink
Allow on demand dev releases (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO authored Jul 21, 2024
1 parent 596bf86 commit 48587af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
version: pnpm ci:version
publish: pnpm ci:publish
version: ${{ github.ref == 'refs/heads/main' && 'pnpm ci:version' || 'pnpm ci:version --snapshot dev' }}
publish: ${{ github.ref == 'refs/heads/main' && 'pnpm ci:publish' || 'pnpm ci:publish --tag dev' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -84,7 +84,8 @@ jobs:
- name: Bump version.py
run: |
export module=$(sed 's/^.*\///' <<< ${{ matrix.package.name }} | tr '-' '/')
sed -i "s/__version__.*/__version__ = \"${{ matrix.package.version }}\"/" $module/version.py
export version=$(sed 's|-\([0-9]*\)$|\1|' <<< ${{ matrix.package.version }})
sed -i "s/__version__.*/__version__ = \"$version\"/" $module/version.py
- name: Build package
run: python -m build
Expand Down

0 comments on commit 48587af

Please sign in to comment.