Fix and improve the release workflow
Ad the relevant part of the changelog as release notes to the release and fix some schema-related issues.
This commit is contained in:
parent
e1319dcfc2
commit
92c75d09b9
|
@ -2,7 +2,8 @@ name: "Release"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: "v*"
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
@ -20,22 +21,16 @@ jobs:
|
||||||
echo "Releasing version: $VERSION"
|
echo "Releasing version: $VERSION"
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install Rust stable toolchain
|
- name: Get the release notes from the changelog
|
||||||
uses: https://github.com/actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||||
profile: minimal
|
RELEASE_NOTES=$(sed -n -e "/^## \[$VERSION\]/,/^## \[/{//"'!'"p;}" CHANGELOG.md | sed -e '1d;$d')
|
||||||
toolchain: stable
|
echo "Release notes:"
|
||||||
override: true
|
echo
|
||||||
|
echo "$RELEASE_NOTES"
|
||||||
- name: Install cargo-deb
|
echo "RELEASE_NOTES<<$EOF" >> "$GITHUB_ENV"
|
||||||
uses: https://github.com/brndnmtthws/rust-action-cargo-binstall@v1
|
echo "$RELEASE_NOTES" >> "$GITHUB_ENV"
|
||||||
with:
|
echo "$EOF" >> "$GITHUB_ENV"
|
||||||
packages: cargo-deb
|
|
||||||
|
|
||||||
- name: Run cargo-deb
|
|
||||||
uses: https://github.com/actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: deb
|
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
|
@ -47,11 +42,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
# This is available by default.
|
# This is available by default.
|
||||||
api_key: '${{ secrets.RELEASE_TOKEN }}'
|
api_key: '${{ secrets.RELEASE_TOKEN }}'
|
||||||
files: target/debian/solar-grabber*.deb
|
files: FIXME
|
||||||
title: 'Release ${{ env.VERSION }}'
|
title: 'Release ${{ env.VERSION }}'
|
||||||
|
body: '${{ env.RELEASE_NOTES }}'
|
||||||
|
|
||||||
release-crate:
|
release-crate:
|
||||||
name: "Release crate"
|
name: "Release Rust crate"
|
||||||
runs-on: debian-latest
|
runs-on: debian-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
|
@ -82,7 +78,7 @@ jobs:
|
||||||
args: --registry luon
|
args: --registry luon
|
||||||
|
|
||||||
release-docker-image:
|
release-docker-image:
|
||||||
name: "Release Docker images"
|
name: "Release Docker image"
|
||||||
runs-on: debian-latest
|
runs-on: debian-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/catthehacker/ubuntu:act-latest
|
image: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
|
Loading…
Reference in New Issue