Skip to content

Commit c8102ad

Browse files
committed
added changelog and deploy action workflow
1 parent be2487b commit c8102ad

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Automatically pull down the required versions of windows plugins
2+
# and bundle them up for releases. This makes staging on non-internet
3+
# connected systems easier.
4+
name: "DEPLOY"
5+
6+
on:
7+
push:
8+
tags:
9+
- "v*.*.*"
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
if: startsWith(github.ref, 'refs/tags/')
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Setup Python 3.9
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: "3.9"
24+
25+
- name: Installing Python Poetry
26+
run: pip install poetry
27+
28+
- name: Install and Build pwncat-cs Package
29+
run: |
30+
poetry install
31+
poetry build
32+
33+
- name: Publish Package to TestPyPi
34+
run: |
35+
# Test that package publishing is going to work with the testpypi
36+
# instance first before trying to package plugins.
37+
poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }}
38+
poetry config repositories.testpypi https://test.pypi.org/legacy/
39+
poetry publish --repository testpypi
40+
41+
- name: Publish Package to PyPi
42+
run: |
43+
# Everything looks good, publish to pypi
44+
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
45+
poetry publish
46+
47+
- name: Extract Release Body
48+
run: |
49+
# Grab tag name without the `v`
50+
version=$(git describe --tags --abbrev=0 | sed 's/v//')
51+
# build a changelog with just logs from this release
52+
echo "## Changelog" >> this_version_changelog.md
53+
cat CHANGELOG.md | sed -n '/^## \['"$version"'\]/,/^## /p' | head -n -1 | tail -n +2 >> this_version_changelog.md
54+
echo "[Full Changelog](https://github.com/brootware/PyRedactKit/blob/v$version/CHANGELOG.md)" >> this_version_changelog.md

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
The Changelog starts with v0.3.3, because we did not keep one before that,
9+
and simply didn't have the time to go back and retroactively create one.
10+
11+
## [Unreleased]
12+
13+
### Fixed
14+
15+
- Fixed `shlex.join` use with non-str type objects (e.g. `RemotePath`)
16+
- Fixed `set` command use with incorrect keys (e.g. `set invalid value`)
17+
18+
### Added
19+
20+
- Added missed `PlatformError` for `upload` command (e.g. "no gtfobins writers available")
21+
22+
## [0.3.3] - 2022-07-24
23+
24+
Started automating Pypi publishing via github actions.
25+
26+
### Changed
27+
28+
- No notable changes.

0 commit comments

Comments
 (0)