Skip to content

Commit

Permalink
fix: test pypi test
Browse files Browse the repository at this point in the history
  • Loading branch information
TomDarmon committed Mar 12, 2024
1 parent 9694160 commit fb92a96
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
46 changes: 33 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,57 @@
# This workflow triggers the CI, updates the version, and uploads the release to GitHub and Google Cloud Storage when a push is made to either the 'main' or 'develop' branch.
# This workflow triggers the CI, updates the version, and uploads the release to GitHub and
# Google Artifact Registry when a push is made to either the 'main' or 'develop' branch.
#
# Workflow Steps:
#
# 1. Ci is triggered using the CI workflow defined in .github/workflows/ci.yaml
# 2. If it succeeds, the version is updated using Python Semantic Release
# 3. The release is uploaded to GitHub (same step and GitHub action)
# 5. Authentication to Google Cloud is achieved using Workload Identity Federation
# 6. The release is uploaded to Google Artifact Registry
#
# For more details on setting up Workload Identity Federation for GitHub,
# visit https://github.com/google-github-actions/auth#setting-up-workload-identity-federation
# WIF service account must have roles/artifactregistry.write access to the Artifact Registry repository

name: CI and Release on main

on:
push:
branches:
- main
- fea/pypy_release

jobs:
CI:
ci:
name: CI
uses: ./.github/workflows/ci.yaml

Release:
release:
name: Release
runs-on: ubuntu-latest
concurrency: Release
needs: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
needs: ci
permissions:
id-token: write
contents: write
environment:
name: pypi
url: https://test.pypi.org/p/bytetracking

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}

- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GH_TOKEN }}

- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GH_TOKEN }}
Publish to Pypi
- name: Publish package distributions to PyPI
if: steps.python-semantic-release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "bytetracker"
authors = ["TomDarmon <[email protected]>"]
description = "Maintained fork of bytetrack-pip"
version = "0.2.0"
version = "0.0.0"
readme = "README.md"


Expand Down

0 comments on commit fb92a96

Please sign in to comment.