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

Fully automatic release versioning #197

Merged
Merged
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
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name-template: 'v$RESOLVED_VERSION 🌈'
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,31 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade poetry

- name: Set release version
run: |
tag="${GITHUB_REF_NAME}"
version="${tag#v}" # Strip leading v

# Bump poetry tag
poetry version "$version"

# Bump docs tag
sed -i'' 's/^release = "[^"]*"/release = "'"$version"'"/' docs/conf.py
# Bump docs copyright
year="$(date +%Y)"
sed -i'' 's/^copyright = "[^"]*"/copyright = "Replit, '"$year"'"/' docs/conf.py

- name: Build and publish
run: |
poetry build
Expand Down
6 changes: 0 additions & 6 deletions RELEASING

This file was deleted.

8 changes: 8 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Cutting new releases is fully managed by GitHub Actions.
Version numbers do not need to be set in files prior to releasing, as they are incorporated on the fly.

1. Navigate to https://github.com/replit/replit-py/releases
1. Find the latest `Draft` release, click `Edit`
1. Verify that the draft looks like what you'd expect
1. Scroll to the bottom and click `Publish`
1. Navigate to [`Upload Python Package`](https://github.com/replit/replit-py/actions/workflows/python-publish.yml) and watch your release
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# -- Project information -----------------------------------------------------

project = "replit-py"
copyright = "2021"
copyright = "Replit, 2023"
author = "<a href='https://repl.it/'>Replit</a>"

# The full version, including alpha/beta/rc tags
release = "3.3.0"
release = "0.0.0" # Set via GitHub Actions
html_theme = "alabaster"

# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "replit"
version = "3.5.0"
version = "0.0.0" # Set by GitHub Actions
description = "A library for interacting with features of repl.it"
authors = ["Repl.it <[email protected]>", "mat <[email protected]>", "kennethreitz <[email protected]>", "Scoder12 <[email protected]>", "AllAwesome497", ]
license = "ISC"
Expand Down
Loading