mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 14:05:39 +00:00
Updating buildid
This commit is contained in:
parent
65cf9ea947
commit
26adc54c18
16
.github/workflows/cooker-selfhosted.yml
vendored
16
.github/workflows/cooker-selfhosted.yml
vendored
|
@ -30,12 +30,18 @@ jobs:
|
||||||
run: sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/*
|
run: sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/*
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Generate build ID
|
|
||||||
id: generating_buildid
|
|
||||||
run: echo "##[set-output name=build-id;]$(echo "$( git rev-parse --short HEAD )")"
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Generate build ID
|
||||||
|
run: |
|
||||||
|
word1=$(curl -s https://random-word-api.herokuapp.com/word?length=5 | tr -d '[]"')
|
||||||
|
capitalized_word1="$(tr '[:lower:]' '[:upper:]' <<< ${word1:0:1})${word1:1}"
|
||||||
|
word2=$(curl -s https://random-word-api.herokuapp.com/word?length=5 | tr -d '[]"')
|
||||||
|
capitalized_word2="$(tr '[:lower:]' '[:upper:]' <<< ${word2:0:1})${word2:1}"
|
||||||
|
result=$capitalized_word1$capitalized_word2
|
||||||
|
echo $result >> ${GITHUB_WORKSPACE}/buildid
|
||||||
|
echo "buildid=$result" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Initialize environment
|
- name: Initialize environment
|
||||||
run: |
|
run: |
|
||||||
git pull
|
git pull
|
||||||
|
@ -78,7 +84,7 @@ jobs:
|
||||||
- name: Publish the flatpak in a new cooker release
|
- name: Publish the flatpak in a new cooker release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
tag: "${{ env.GITHUB_REF_SLUG }}-${{ steps.generating_buildid.outputs.build-id }}"
|
tag: "${{ env.GITHUB_REF_SLUG }}[${{ env.buildid }}]"
|
||||||
body: |
|
body: |
|
||||||
# Release Notes (Cooker)
|
# Release Notes (Cooker)
|
||||||
This is a cooker snapshot based on the commit: ${{ github.event.repository.full_name }}@${{github.sha}}.
|
This is a cooker snapshot based on the commit: ${{ github.event.repository.full_name }}@${{github.sha}}.
|
||||||
|
|
|
@ -78,7 +78,7 @@ modules:
|
||||||
mkdir -p ${FLATPAK_DEST}/retrodeck/
|
mkdir -p ${FLATPAK_DEST}/retrodeck/
|
||||||
if [[ $VERSION == *"cooker"* ]];
|
if [[ $VERSION == *"cooker"* ]];
|
||||||
then
|
then
|
||||||
VERSION="$VERSION-[$(git rev-parse --short HEAD)]"
|
VERSION="$VERSION[$echo ./buildid]"
|
||||||
fi
|
fi
|
||||||
echo $VERSION >> ${FLATPAK_DEST}/retrodeck/version
|
echo $VERSION >> ${FLATPAK_DEST}/retrodeck/version
|
||||||
cat ${FLATPAK_DEST}/retrodeck/version
|
cat ${FLATPAK_DEST}/retrodeck/version
|
||||||
|
|
Loading…
Reference in a new issue