Cleanup #138
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
name: Cleanup | |
on: | |
schedule: | |
- cron: "0 6 * * 1" | |
workflow_dispatch: | |
env: | |
package_name: run-script | |
jobs: | |
gpr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Get project version | |
id: project | |
run: | | |
_version="$(jq -r '.tools."${{ env.package_name }}".version' ./.config/dotnet-tools.json)" | |
_version="${_version//'.'/'\.'}" | |
_version="^${_version}\$" | |
echo "version=${_version}" >> $GITHUB_OUTPUT | |
# Keep the last 13 versions as well as the version used by the project itself | |
- uses: actions/[email protected] | |
with: | |
package-name: ${{ env.package_name }} | |
package-type: nuget | |
delete-only-pre-release-versions: true | |
min-versions-to-keep: 13 | |
ignore-versions: ${{ steps.project.outputs.version }} |