release: v1.4.4a4 #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
pypi: | |
runs-on: ubuntu-22.04 | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade poetry | |
poetry install | |
- name: Build wheel | |
run: poetry build | |
- name: Publish wheel to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
appimage: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Parse the Version | |
id: version | |
run: | | |
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
echo ::set-output name=PRERELEASE::$( | |
[[ ! $GITHUB_REF =~ ^refs\/tags\/v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "true" | |
) | |
- name: Set up APPDIR for after_bundle | |
run: echo "APPDIR=$PWD/AppDir" >> $GITHUB_ENV | |
- name: Build AppImage | |
uses: AppImageCrafters/build-appimage@v1.3 | |
with: | |
recipe: './appimage-builder.yml' | |
env: | |
APP_VERSION: ${{ steps.version.outputs.VERSION }} | |
- name: Generate Changelog | |
id: changelog | |
run: | | |
git fetch --unshallow | |
PREVIOUS_TAG="$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" | |
CHANGELOG="$(git --no-pager log --pretty="format:- %s" $PREVIOUS_TAG..${{ steps.version.outputs.VERSION }})" | |
CHANGELOG="${CHANGELOG//'%'/'%25'}" | |
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" | |
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" | |
echo "::set-output name=CHANGELOG::$CHANGELOG" | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: ${{ steps.version.outputs.VERSION }} | |
artifacts: 'rclip-*.AppImage' | |
body: ${{ steps.changelog.outputs.CHANGELOG || 'internal release' }} | |
prerelease: ${{ steps.version.outputs.PRERELEASE }} | |
token: ${{ secrets.GITHUB_TOKEN }} |