-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI for auto release and push artifacts with it (.rpm and .deb)
This commit adds a new CI job to push artifacts and generate a new release on every update we make. It will make the process after running unit tests so that we can garantee a safe artifact for the final user with our latest changes. It was needed to change a few small things on the packagers (deb and rpm) so that we keep the artifacts afer installing them on the docker containers.
- Loading branch information
1 parent
be4a367
commit f1af1dd
Showing
3 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,3 +91,36 @@ jobs: | |
verbose: true | ||
if: matrix.install_variant == 'pip' | ||
- run: echo "🥑 This job's status is ${{ job.status }}." | ||
|
||
# Publish release: | ||
- name: Set Release Variables | ||
id: set_vars | ||
run: | | ||
CHANGELOG_REVS=($(sed -n -e 's/^guibot[ \t]*(\([0-9]*.[0-9]*\)-[0-9]*).*/\1/p' "/home/runner/work/guibot/guibot/packaging/debian/changelog")) | ||
VERSION=${CHANGELOG_REVS[0]} | ||
echo "version=$VERSION" >> $GITHUB_ENV | ||
if [[ "${{ matrix.install_variant }}" == "rpm.fedora.40" ]]; then | ||
EXTENSION="rpm" | ||
EXE_NAME="guibot" | ||
else | ||
EXTENSION="deb" | ||
EXE_NAME="python3-guibot" | ||
fi | ||
echo "ext=$EXTENSION" >> $GITHUB_ENV | ||
echo "name=$EXE_NAME" >> $GITHUB_ENV | ||
if: matrix.install_variant != 'pip' | ||
|
||
- name: Create Release and Push Artifacts | ||
uses: ncipollo/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
name: 'guibot ${{ env.version }}' | ||
tag: "${{ env.version }}" | ||
body: 'Auto generated release builds' | ||
artifacts: '/home/runner/work/guibot/guibot/${{ env.name }}_${{ env.version }}.${{ env.ext }}' | ||
updateOnlyUnreleased: 'false' | ||
allowUpdates: 'true' | ||
prerelease: 'false' | ||
makeLatest: 'true' | ||
if: matrix.install_variant != 'pip' |
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
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