Skip to content

Update version to 2.0.2 #4

Update version to 2.0.2

Update version to 2.0.2 #4

Workflow file for this run

name: release
on:
push:
tags:
- "*.*.*"
jobs:
build_and_deploy_wheel:
if: github.repository == 'sapporo-wes/sapporo-service'
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Python Build Module and Twine
run: |
python3 -m pip install --progress-bar off -U pip
python3 -m pip install build twine
- name: Build Binary Wheel and Source Tarball
run: |
python3 -m build
- name: Check Distribution Validity with Twine
run: twine check dist/*
- name: Publish Package to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/*
- name: Upload sdist as Artifact
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/sapporo-${{ github.ref_name }}.tar.gz
- name: Upload wheel as Artifact
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/sapporo-${{ github.ref_name }}-py3-none-any.whl
deploy_ghcr:
if: github.repository == 'sapporo-wes/sapporo-service'
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/sapporo-service:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/sapporo-service:latest
create_release:
if: github.repository == 'sapporo-wes/sapporo-service'
needs: [build_and_deploy_wheel]
runs-on: ubuntu-22.04
steps:
- name: Download sdist
uses: actions/download-artifact@v4
with:
name: sdist
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: wheel
- name: Release
run: gh release --repo ${{ github.repository }} create ${{ github.ref_name }} --title ${{ github.ref_name }} --generate-notes sapporo-${{ github.ref_name }}.tar.gz sapporo-${{ github.ref_name }}-py3-none-any.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}