Skip to content

Commit

Permalink
ff
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Aug 22, 2024
1 parent 0e5f60c commit 691eacf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:

runs-on: ubuntu-latest

outputs:
version: ${{ steps.identify.outputs.version }}

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -33,27 +36,24 @@ jobs:

- id: identify
run: |
export VERSION="$(date +"%-y.%-m.%-d")"
export RELEASE_DATE="$(date +"%Y-%m-%d")"
echo "VERSION="$(date +"%-y.%-m.%-d")"" >> $GITHUB_ENV
echo "RELEASE_DATE="$(date +"%Y-%m-%d")"" >> $GITHUB_ENV
sed -i '/<release /s/version="[^"]*"/version="'"$VERSION"'"/; /<release /s/date="[^"]*"/date="'"$RELEASE_DATE"'"/' "res/linux/metainfo.xml"
sed -i '/\[package.metadata.packager\]/,/^$/s/version = ".*"/version = "'"$VERSION"'"/' "Cargo.toml"
echo $VERSION > VERSION
sed -i '/<release /s/version="[^"]*"/version="'"${{ env.VERSION }}"'"/; /<release /s/date="[^"]*"/date="'"${{ env.RELEASE_DATE }}"'"/' "res/linux/metainfo.xml"
sed -i '/\[package.metadata.packager\]/,/^$/s/version = ".*"/version = "'"${{ env.VERSION }}"'"/' "Cargo.toml"
echo ${{ env.VERSION }} > VERSION
changelog-gen generate --exclude-unidentified
changelog-gen release --version $VERSION
changelog-gen release --version ${{ env.VERSION }}
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "version=${{ env.VERSION }}" >> $GITHUB_OUTPUT
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(changelog): automatic release generation (skip changelog) [skip ci]"
tagging_message: ${{ env.VERSION }}

outputs:
version: ${{ env.VERSION }}

upload-artifacts:
needs:
- commit-changes
Expand All @@ -79,6 +79,6 @@ jobs:
changelog-gen -- show > RELEASE_CHANGELOG.md
# https://cli.github.com/manual/gh_release_create
gh release create ${{ github.event.inputs.tag }} --title ${{ github.event.inputs.tag }} \
gh release create ${{ needs.commit-changes.outputs.version }} --title ${{ needs.commit-changes.outputs.version }} \
--notes-file RELEASE_CHANGELOG.md --target $GITHUB_SHA \
./fan-control*/*
4 changes: 2 additions & 2 deletions DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
- update release section of [metadata file](./res/linux/metainfo.xml)
- change the version in [Cargo.toml](./Cargo.toml)
- change the version in [VERSION](./VERSION)
- new release in the [CHANGELOG](./CHANGELOG.md)
- launch the release workflow [here](https://github.com/wiiznokes/fan-control/actions/workflows/release.yml)


- new release in the [CHANGELOG](./CHANGELOG.md)
- make a pull request in [here](https://github.com/flathub/io.github.wiiznokes.fan-control)
- launch the release workflow [here](https://github.com/wiiznokes/fan-control/actions/workflows/release.yml)

## run specific test:

Expand Down

0 comments on commit 691eacf

Please sign in to comment.