Thanks to visit codestin.com
Credit goes to github.com

Skip to content

build: run meson install directly #187

build: run meson install directly

build: run meson install directly #187

Workflow file for this run

name: Create Release

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 20, Col: 7): Unexpected value 'with'
on:
workflow_dispatch:
inputs:
nextVersion:
description: 'The next version of fvwm3 after this release: '
required: true
isDraft:
description: 'Make a draft release, rather than an official release'
type: boolean
required: true
jobs:
createrelease:
runs-on: blacksmith-4vcpu-ubuntu-2404
container: fvwmorg/fvwm3-build:latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Repo Settings
run: |
git config --global user.name "Thomas Adam"
git config --global user.email "[email protected]"
- name: Get Current Version (for release...)
id: versionRelease
run: |
git fetch -q -n origin
echo "versionRelease=$(git show HEAD:./.current-version)" >> $GITHUB_ENV
- name: Create release branch
run: |
git checkout -b release/${{ env.versionRelease }}
- name: Get date
id: date
run: echo "date=$(date -d 'now' +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Generate changelog
run: |
printf "## [${{ env.versionRelease }}](https://github.com/fvwmorg/fvwm3/tree/${{ env.versionRelease }}) (${{ env.date }})\n" >./tmp.out
curl \
--silent \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/fvwmorg/fvwm3/releases/generate-notes \
-d '{"tag_name":"${{ env.versionRelease }}","target_commitish":"main","configuration_file_path":".github/release.yml"}' | \
jq -r '.body' >> ./tmp.out
sed -i '2d' ./tmp.out
sed -i "2r tmp.out" CHANGELOG.md
- name: Create release commit
run: |
echo "ISRELEASED=yes" > .release-status
git add .release-status
git add CHANGELOG.md
git commit -a --author="Thomas Adam <[email protected]>" -m "[AUTO]: release ${{ env.versionRelease }}"
git checkout main
git merge --ff-only release/${{ env.versionRelease }}
git tag -am "Release ${{ env.versionRelease }}" ${{ env.versionRelease }}
git push
git push origin --tags ${{ env.versionRelease }}
- name: Build artefacts
run: |
meson setup --reconfigure build -Dmandoc=true -Dhtmldoc=true -Dgolang=enabled && \
meson compile -C build && meson dist --formats gztar -C build
- name: Create a draft release
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
gh \
release \
create ${{ env.versionRelease }} \
${{ github.event.inputs.isDraft == 'true' && '--draft' || '' }} \
--target main \
--generate-notes \
./build/meson-dist/fvwm3-${{ env.versionRelease }}.tar.gz
- name: Bump next version
run: |
git clean -dfx
git checkout main
git pull -q
echo "${{ github.event.inputs.nextVersion }}" > .current-version
git add .current-version
echo "ISRELEASED=no" > .release-status
git commit -am "build: set next version"
git push