Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release and prerelease workflows #104

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions .github/workflows/docs.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: TestPyPI

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+'

jobs:

build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
name: pypi-artifacts
path: dist/*.tar.gz

show-artifacts:
needs: ["build-sdist"]
name: "Show artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist

- shell: bash
run: |
ls -l ${{ github.workspace }}/dist

publish-to-test-pypi:
needs: ["build-sdist"]
name: "Publish to TestPyPI"
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: 'https://test.pypi.org/legacy/'
skip_existing: true
print_hash: true
verify_metadata: false
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: PyPI

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- '!v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+'


jobs:

build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
name: pypi-artifacts
path: dist/*.tar.gz

show-artifacts:
needs: ["build-sdist"]
name: "Show artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist

- shell: bash
run: |
ls -l ${{ github.workspace }}/dist

publish-to-pypi:
needs: ["build-sdist"]
name: "Publish to PyPI"
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
print_hash: true
verify_metadata: false
2 changes: 1 addition & 1 deletion babelizer/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.10.dev0"
__version__ = "0.3.10a0"
Loading