Skip to content

release: v1.4.0

release: v1.4.0 #74

Workflow file for this run

name: release
on:
push:
tags:
- v*
jobs:
build-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 }}