Skip to content

Update version to 1.6.1 #26

Update version to 1.6.1

Update version to 1.6.1 #26

Workflow file for this run

name: deploy
on:
push:
tags:
- "*.*.*"
jobs:
build_and_deploy_wheel:
if: github.repository == 'sapporo-wes/sapporo-service'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: "Install Python Build Module"
run: |
python3 -m pip install build
- 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:
- 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@v3
with:
name: sdist
- name: "Download sdist"
uses: actions/download-artifact@v3
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 }}