Stop uploading snapshots to artifactory

JFrog will deactivate the free account that LOOT's Artifactory is owned
by on 2023-07-02, at which point it'll no longer be possible to upload
artifacts there.
This commit is contained in:
Oliver Hamlet
2023-06-05 18:00:22 +01:00
parent d3572b5127
commit e7a554ede1
2 changed files with 7 additions and 52 deletions
-50
View File
@@ -12,56 +12,6 @@ env:
MSVC_CONFIG: RelWithDebInfo
jobs:
# Publish to Artifactory as a separate job that runs after the build jobs
# because we must first clean out any existing artifacts for this Git ref,
# and we don't want to do that as a pre-build step in case the build fails
# and we're left with no artifacts published.
publish-to-artifactory:
runs-on: ubuntu-20.04
needs: [linux, windows]
if: github.event_name == 'push'
steps:
- name: Clean up artifacts on Artifactory
run: |
curl -sfSLO 'https://raw.githubusercontent.com/Ortham/ci-scripts/2.2.0/remove_old_artifactory_files.py'
python3 remove_old_artifactory_files.py \
--artifactory-host loot.jfrog.io \
--artifactory-api-key ${{ secrets.ARTIFACTORY_API_KEY }} \
--artifactory-repository libloot \
--current-branch "${GITHUB_REF#refs/*/}" \
--github-repository loot/libloot \
--github-token ${{ secrets.GITHUB_TOKEN }}
- name: Create empty directory for artifacts
run: |
rm -rf downloaded_artifacts
mkdir downloaded_artifacts
- name: Download all artifacts for this workflow from GitHub Actions
uses: actions/download-artifact@v3
with:
path: downloaded_artifacts
- name: Publish artifacts to Artifactory
shell: bash
run: |
curl -sfSLO 'https://raw.githubusercontent.com/Ortham/ci-scripts/2.2.0/percent_encode.py'
PERCENT_ENCODED_GIT_REF_NAME=$(python3 percent_encode.py "${GITHUB_REF#refs/*/}")
for ARTIFACT_DIRECTORY in downloaded_artifacts/*
do
ARTIFACT_NAME="${ARTIFACT_DIRECTORY#downloaded_artifacts/}"
PERCENT_ENCODED_ARTIFACT_NAME=$(python3 percent_encode.py "$ARTIFACT_NAME")
curl -sSfL \
-X PUT \
-T "$ARTIFACT_DIRECTORY/$ARTIFACT_NAME" \
-H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_API_KEY }}" \
"https://loot.jfrog.io/artifactory/libloot/${PERCENT_ENCODED_GIT_REF_NAME}/$PERCENT_ENCODED_ARTIFACT_NAME"
done
linux:
runs-on: ubuntu-20.04
+7 -2
View File
@@ -13,10 +13,15 @@ libloot provides access to LOOT's metadata and sorting functionality, and the LO
## Downloads
Releases are hosted on [GitHub](https://github.com/loot/libloot/releases), and snapshot builds are available on [Artifactory](https://loot.jfrog.io/ui/repos/tree/General/libloot). The snapshot build archives are named like so:
Releases are hosted on [GitHub](https://github.com/loot/libloot/releases).
Snapshot builds are available as artifacts from [GitHub Actions runs](https://github.com/loot/libloot/actions), though they are only kept for 90 days and can only be downloaded when logged into a GitHub account. To mitigate these restrictions, snapshot build artifacts include a GPG signature that can be verified using the public key hosted [here](https://loot.github.io/.well-known/openpgpkey/hu/mj86by43a9hz8y8rbddtx54n3bwuuucg), which means it's possible to re-upload the artifacts elsewhere and still prove their authenticity.
The snapshot build artifacts are named like so:
```
libloot-<last tag>-<revisions since tag>-g<short revision ID>_<branch>-<platform>.7z
libloot-<last tag>-<revisions since tag>-g<short revision ID>_<branch>-<platform>.<file extension>
```
## Building libloot