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

Fix release action #22

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4f94bd7
Try 1
MartinThoma Jul 19, 2023
f69d9eb
Try 32
MartinThoma Jul 19, 2023
c46af93
Try2
MartinThoma Jul 19, 2023
95d2a0b
Try 3
MartinThoma Jul 19, 2023
1134358
Try 4
MartinThoma Jul 19, 2023
d072968
Try 5
MartinThoma Jul 19, 2023
96ca0b8
Use env
MartinThoma Jul 19, 2023
b5ea147
quotes
MartinThoma Jul 19, 2023
605ff2e
no braces
MartinThoma Jul 19, 2023
ed1527f
Quote other
MartinThoma Jul 19, 2023
5d345e4
EOF usage
MartinThoma Jul 19, 2023
e873a0c
quotes again
MartinThoma Jul 19, 2023
8cadee1
PR
MartinThoma Jul 19, 2023
8cb91fb
fixes
MartinThoma Jul 19, 2023
21fd2ff
More quotes
MartinThoma Jul 19, 2023
cb58c3f
Noquotes
MartinThoma Jul 19, 2023
b0347b2
Last try
MartinThoma Jul 19, 2023
7d5a7f1
another one
MartinThoma Jul 19, 2023
4a162a3
Really last
MartinThoma Jul 19, 2023
a8b22df
no-pager
MartinThoma Jul 19, 2023
f9bfc41
Remove top
MartinThoma Jul 19, 2023
cef9474
echo
MartinThoma Jul 19, 2023
f80ca99
Foobar
MartinThoma Jul 19, 2023
ddce2a0
noquotes
MartinThoma Jul 19, 2023
90364c3
MasterOdin
MartinThoma Jul 19, 2023
bd8fded
another one
MartinThoma Jul 20, 2023
0670cf1
add no-pager
MartinThoma Jul 20, 2023
c578c51
body in quotes
MartinThoma Jul 20, 2023
661a97c
foo
MartinThoma Jul 20, 2023
20aca61
Ue tempfile
MartinThoma Jul 20, 2023
a363e50
just one
MartinThoma Jul 20, 2023
8309937
next
MartinThoma Jul 20, 2023
eb08e03
last
MartinThoma Jul 20, 2023
4e75f97
permission
MartinThoma Jul 20, 2023
16a6b9d
Add echo
MartinThoma Jul 20, 2023
20eb131
FML
MartinThoma Jul 20, 2023
f9172a0
fix again
MartinThoma Jul 20, 2023
302d7cd
old action
MartinThoma Jul 20, 2023
3a90f07
old needs env
MartinThoma Jul 20, 2023
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
44 changes: 17 additions & 27 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,40 @@
name: Publish Python Package to PyPI
on:
push:
tags:
- '*.*.*'
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build_and_publish:
name: Publish a new version
runs-on: ubuntu-latest

permissions:
contents: write

steps:
# Ensure it's on PyPI
- name: Checkout Repository
uses: actions/checkout@v3

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

- name: Install Flit
run: |
python -m pip install --upgrade pip
pip install flit

- name: Publish Package to PyPI🚀
env:
FLIT_USERNAME: '__token__'
FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}
run: |
flit publish

# Create the Github Page
- name: Prepare variables
id: prepare_variables
run: |
git fetch --tags --force
latest_tag=0.2.13
echo "latest_tag=0.2.13" >> "$GITHUB_ENV"
echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"
git --no-pager tag -l ${latest_tag} --format='%(contents:body)' >> tmpCHANGELOG.txt
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "tag_body<<$EOF" >> "$GITHUB_ENV"
git tag -l "${GITHUB_REF_NAME}" --format='%(contents:body)' >> "$GITHUB_ENV"
git tag -l "${latest_tag}" --format='%(contents:body)' >> "$GITHUB_ENV"
echo "$EOF" >> "$GITHUB_ENV"
- name: Create GitHub Release 🚀
uses: softprops/action-gh-release@v1
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
name: Version ${{ env.GITHUB_REF_NAME }}, ${{ env.date }}
tag_name: ${{ env.latest_tag }}
release_name: Version ${{ env.latest_tag }}, ${{ env.date }}
draft: false
prerelease: false
body: Body is ${{ env.tag_body }}
body: ${{ env.tag_body }}
Loading