Skip to content

chore: release v0.0.50 #50

chore: release v0.0.50

chore: release v0.0.50 #50

Workflow file for this run

# yaml-language-server: $schema=https://json-schema.org/draft-07/schema#
name: Release
on:
push:
tags:
- "v*"
env:
python_version: "3.10"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set node
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python runtime
uses: actions/setup-python@v4
with:
python-version: "${{ env.python_version }}"
- uses: Gr1N/setup-poetry@v8
- name: Install Dependencies
run: |
poetry --version
poetry install
- name: Build
run: |
poetry build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
release-image:
runs-on: ubuntu-latest
needs: release-pypi
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Tag
id: get-tag
run: |
tag="${{ github.ref_name }}"
echo "before: ${tag}"
prefix="v"
tag=${tag#"${prefix}"}
echo "::set-output name=tag::$(echo $tag)"
echo "after: ${tag}"
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Available platforms
run: echo ${{ steps.qemu.outputs.platforms }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to ALiYun Container Registry
uses: docker/login-action@v3
with:
registry: registry.cn-beijing.aliyuncs.com
username: ${{ secrets.ALIYUN_REGISTRY_USERNAME }}
password: ${{ secrets.ALIYUN_REGISTRY_TOKEN }}
- id: github_repo_owner_string
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.repository_owner }}
- name: Build and push
uses: docker/build-push-action@v5
env:
image_name: board-spider-runtime
tag: ${{ steps.get-tag.outputs.tag }}
with:
context: ./
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
docker.io/xcpcio/${{ env.image_name }}:${{ env.tag }}
docker.io/xcpcio/${{ env.image_name }}:latest
ghcr.io/xcpcio/${{ env.image_name }}:${{ env.tag }}
ghcr.io/xcpcio/${{ env.image_name }}:latest
registry.cn-beijing.aliyuncs.com/xcpcio/${{ env.image_name }}:${{ env.tag }}
registry.cn-beijing.aliyuncs.com/xcpcio/${{ env.image_name }}:latest
build-args: |
XCPCIO_BOARD_SPIDER_VERSION=${{ env.tag }}