diff --git a/.github/workflows/delete-prereleases.yml b/.github/workflows/delete-prereleases.yml new file mode 100644 index 0000000..207628d --- /dev/null +++ b/.github/workflows/delete-prereleases.yml @@ -0,0 +1,17 @@ +--- +name: Delete pre-releases + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: dev-drprasad/delete-older-releases@v0.3.2 + with: + delete_prerelease_only: true + delete_tags: true + keep_latest: 0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 38d5dc0..4414389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Sheriff Azure DevOps Extension Changelog +## 0.0.5 + +* `InstallSheriffCLI` task updated to download Sheriff from Azure Storage. + ## 0.0.4 * `InstallSheriffCLI` task updated to bug fix HTTP 404 when running on Windows agents. diff --git a/tasks/InstallSheriffCLI/InstallSheriffCLIV0/package-lock.json b/tasks/InstallSheriffCLI/InstallSheriffCLIV0/package-lock.json index be20075..74d03d4 100644 --- a/tasks/InstallSheriffCLI/InstallSheriffCLIV0/package-lock.json +++ b/tasks/InstallSheriffCLI/InstallSheriffCLIV0/package-lock.json @@ -1,12 +1,12 @@ { "name": "install-sheriff-cli-task", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "install-sheriff-cli-task", - "version": "0.0.2", + "version": "0.0.3", "license": "GPL-3.0", "dependencies": { "axios": "^1.4.0", diff --git a/tasks/InstallSheriffCLI/InstallSheriffCLIV0/package.json b/tasks/InstallSheriffCLI/InstallSheriffCLIV0/package.json index ca0fc01..4dfaf43 100644 --- a/tasks/InstallSheriffCLI/InstallSheriffCLIV0/package.json +++ b/tasks/InstallSheriffCLI/InstallSheriffCLIV0/package.json @@ -1,6 +1,6 @@ { "name": "install-sheriff-cli-task", - "version": "0.0.2", + "version": "0.0.3", "description": "", "scripts": { "test": "run-p test:*", diff --git a/tasks/InstallSheriffCLI/InstallSheriffCLIV0/src/index.js b/tasks/InstallSheriffCLI/InstallSheriffCLIV0/src/index.js index 048a2c1..f747b4b 100644 --- a/tasks/InstallSheriffCLI/InstallSheriffCLIV0/src/index.js +++ b/tasks/InstallSheriffCLI/InstallSheriffCLIV0/src/index.js @@ -9,6 +9,8 @@ const { promisify } = require('util'); const finished = promisify(stream.finished); +const sas = 'sp=r&st=2024-01-01T00:00:00Z&se=2049-12-31T23:59:59Z&spr=https&sv=2022-11-02&sr=c&sig=Obnq5FJma2NJlE1k0PykIYlHbBcTA1yeba3YRLV6rmw%3D'; + async function run() { try { const version = tl.getInput('version', true); @@ -41,9 +43,9 @@ async function run() { let downloadUrl; if (version === 'latest') { - downloadUrl = `https://github.com/gofrontier-com/sheriff/releases/latest/download/sheriff_${os}_${platform}.${fileExtension}`; + downloadUrl = `https://sa0she0prd0uks0releases.blob.core.windows.net/sheriff/latest/sheriff_${os}_${platform}.${fileExtension}?${sas}`; } else { - downloadUrl = `https://github.com/gofrontier-com/sheriff/releases/download/${version}/sheriff_${os}_${platform}.${fileExtension}`; + downloadUrl = `https://sa0she0prd0uks0releases.blob.core.windows.net/sheriff/${version}/sheriff_${os}_${platform}.${fileExtension}?${sas}`; } const downloadPath = path.join(agentTempDirectory, `sheriff_${os}_${platform}.${fileExtension}`); const toolDirPath = `${agentToolsDirectory}/sheriff/${version}/${platform}`;