chore(ci): misc changes to snapshot deployment
This commit is contained in:
parent
f804a660e6
commit
d25635500d
3 changed files with 14 additions and 10 deletions
4
.github/workflows/deploy_snapshot.yml
vendored
4
.github/workflows/deploy_snapshot.yml
vendored
|
@ -3,6 +3,10 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
actions: write
|
||||||
|
|
||||||
name: Deploy snapshot builds
|
name: Deploy snapshot builds
|
||||||
jobs:
|
jobs:
|
||||||
deploy-release-snapshot:
|
deploy-release-snapshot:
|
||||||
|
|
|
@ -19,7 +19,7 @@ function overwrite_remote_tag() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function has_release() {
|
function has_release() {
|
||||||
gh release view "${LATEST_TAG}" &>/dev/null
|
gh release view "${LATEST_TAG}"
|
||||||
echo "$?"
|
echo "$?"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,9 +28,9 @@ function delete_release() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_rev_file() {
|
function create_rev_file() {
|
||||||
pushd "${ASSET_DIRECTORY}" || return
|
pushd "${ASSET_DIRECTORY}" || exit 1
|
||||||
echo "${CURRENT_REV}" | tee rev-hash.txt
|
echo "${CURRENT_REV}" | tee rev-hash.txt
|
||||||
popd || return
|
popd || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_release() {
|
function create_release() {
|
||||||
|
@ -38,19 +38,19 @@ function create_release() {
|
||||||
CHANGELOG_FILE="$(mktemp)"
|
CHANGELOG_FILE="$(mktemp)"
|
||||||
cp scripts/snapshot-changelog-template.txt "${CHANGELOG_FILE}"
|
cp scripts/snapshot-changelog-template.txt "${CHANGELOG_FILE}"
|
||||||
sed -i "s/__SNAPSHOT_REV__/${CURRENT_REV}/" "${CHANGELOG_FILE}"
|
sed -i "s/__SNAPSHOT_REV__/${CURRENT_REV}/" "${CHANGELOG_FILE}"
|
||||||
pushd "${ASSET_DIRECTORY}" || return
|
pushd "${ASSET_DIRECTORY}" || exit 1
|
||||||
gh release create --prerelease --title "Latest snapshot build" --notes-file "${CHANGELOG_FILE}" "${LATEST_TAG}" ./*
|
gh release create --prerelease --title "Latest snapshot build" --notes-file "${CHANGELOG_FILE}" "${LATEST_TAG}" ./*
|
||||||
popd || return
|
popd || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
overwrite_local_tag
|
overwrite_local_tag
|
||||||
|
|
||||||
if [[ "$(has_release)" -eq 0 ]]; then
|
|
||||||
delete_release
|
|
||||||
fi
|
|
||||||
|
|
||||||
create_rev_file
|
create_rev_file
|
||||||
|
|
||||||
overwrite_remote_tag
|
overwrite_remote_tag
|
||||||
|
|
||||||
|
if [[ "$(has_release)" -eq 0 ]]; then
|
||||||
|
delete_release
|
||||||
|
fi
|
||||||
|
|
||||||
create_release
|
create_release
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Latest release for APS from revision __SNAPSHOT_REV__
|
Snapshot build of APS from revision __SNAPSHOT_REV__
|
||||||
|
|
||||||
Consult the build types documentation [here](https://docs.passwordstore.app/docs/users/build-types) for the differences between free and nonFree builds.
|
Consult the build types documentation [here](https://docs.passwordstore.app/docs/users/build-types) for the differences between free and nonFree builds.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue