Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/ruff-0.0.281
Browse files Browse the repository at this point in the history
  • Loading branch information
ReK42 authored Aug 1, 2023
2 parents 6658f78 + 61bdf6a commit d4700c9
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
changelog:
categories:
- title: Changes
labels:
- "*"
exclude:
labels:
- dependencies
- title: Dependencies
labels:
- dependencies
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Render PR Template
id: pr-template
if: github.event_name == 'pull_request_target'
uses: chuhlomin/render-template@v1.4
uses: chuhlomin/render-template@v1.7
with:
template: ./.github/templates/pr-build.md
vars: |
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: Release

on:
push:
tags: ["release/**"]

permissions:
contents: read

env:
FORCE_COLOR: 1
MYPY_FORCE_COLOR: 1
PY_COLORS: 1
TOX_TESTENV_PASSENV: >-
FORCE_COLOR
MYPY_FORCE_COLOR
NO_COLOR
PY_COLORS
PYTEST_THEME
PYTEST_THEME_MODE
TOX_PARALLEL_NO_SPINNER: 1

jobs:
test:
name: Test
uses: ./.github/workflows/test.yml

release:
name: Release
needs:
- test
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
cache: pip

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[build]
- name: Build
run: python -m build

- name: Get Version
id: version
shell: bash
run: |
export VERSION=$(python -c "import sys;sys.path.append('src/passhash');from _version import version;print(version)")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "version=$VERSION"
[[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]] || exit 1
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true

- name: Publish to GitHub
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.version.outputs.version }}
generate_release_notes: true
files: "dist/*"

0 comments on commit d4700c9

Please sign in to comment.