diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f388388..06d5444 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,14 +118,11 @@ jobs: - run: npx tauri build --bundles ${{ matrix.bundles }} - name: One Paraglide runtime in the frontend bundle run: node scripts/check-single-runtime.mjs - - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 - with: - name: ModbusTool-${{ runner.os }} - path: | - src-tauri/target/release/bundle/msi/*.msi - src-tauri/target/release/bundle/deb/*.deb - src-tauri/target/release/bundle/appimage/*.AppImage - if-no-files-found: error + # Built and checked, not uploaded: about 90 MB a run filled the account's 500 MB of + # artifact storage (2026-11-06). Packages to try come from the releases. + - name: The packages were built + shell: bash + run: ls -l src-tauri/target/release/bundle/*/ModbusTool* # The real app against pymodbus (e2e/run.mjs), on both desktop platforms Tauri can drive. # Windows has no socat, so its run has no serial checks and says so in its output. @@ -199,3 +196,4 @@ jobs: name: e2e-${{ runner.os }} path: ${{ runner.temp }}/e2e if-no-files-found: ignore + retention-days: 7 diff --git a/.github/workflows/clean-artifacts.yml b/.github/workflows/clean-artifacts.yml new file mode 100644 index 0000000..deec0b9 --- /dev/null +++ b/.github/workflows/clean-artifacts.yml @@ -0,0 +1,30 @@ +name: Clean artifacts + +# Deletes every workflow run artifact of this repository, to free the account's artifact storage +# (500 MB on the Free plan, filled by the CI packages until 2026-11-06). Releases and their files +# are not artifacts and are not touched. Start it from the Actions tab (Run workflow). +# REST API: https://docs.github.com/en/rest/actions/artifacts +on: + workflow_dispatch: + +permissions: + actions: write + +jobs: + clean: + runs-on: ubuntu-24.04 + steps: + - name: Delete the artifacts + env: + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} + run: | + gh api --paginate "repos/$REPO/actions/artifacts?per_page=100" \ + --jq '.artifacts[] | "\(.id) \(.size_in_bytes)"' > artifacts.txt + count=$(wc -l < artifacts.txt) + bytes=$(awk '{ s += $2 } END { print s + 0 }' artifacts.txt) + echo "Deleting $count artifacts, $((bytes / 1048576)) MiB" + while read -r id _; do + gh api -X DELETE "repos/$REPO/actions/artifacts/$id" + done < artifacts.txt + echo "Left: $(gh api "repos/$REPO/actions/artifacts?per_page=1" --jq .total_count)" diff --git a/.github/workflows/debug-build.yml b/.github/workflows/debug-build.yml index 46fccf1..99e2862 100644 --- a/.github/workflows/debug-build.yml +++ b/.github/workflows/debug-build.yml @@ -36,3 +36,4 @@ jobs: name: ModbusTool-debug-msi path: src-tauri/target/debug/bundle/msi/*.msi if-no-files-found: error + retention-days: 7 diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index c4dcf9c..000f5b7 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -95,6 +95,7 @@ jobs: with: name: cargo-mutants path: src-tauri/mutants.out + retention-days: 7 stryker: runs-on: ubuntu-24.04 @@ -148,3 +149,4 @@ jobs: with: name: stryker path: reports/mutation + retention-days: 7 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1716dec..a24fcc2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,6 +104,8 @@ jobs: name: windows-unsigned path: src-tauri/target/release/bundle/msi/*.msi if-no-files-found: error + # Only passed to the publish job; the release keeps the packages. + retention-days: 1 build-linux: needs: notes @@ -136,6 +138,7 @@ jobs: src-tauri/target/release/bundle/deb/*.deb src-tauri/target/release/bundle/appimage/*.AppImage if-no-files-found: error + retention-days: 1 sign-windows: needs: [notes, build-windows] @@ -164,6 +167,8 @@ jobs: name: windows-signed path: signed/*.msi if-no-files-found: error + # Only passed to the publish job; the release keeps the packages. + retention-days: 1 publish: needs: [notes, build-windows, build-linux, sign-windows] diff --git a/docs/signing.md b/docs/signing.md index 73b8358..1970137 100644 --- a/docs/signing.md +++ b/docs/signing.md @@ -28,8 +28,8 @@ Apply at for a free open-source subscription, point system to the SignPath project. 2. Create the project (e.g. slug `ModbusTool`) and an artifact configuration with the content of [`.signpath/artifact-configuration.xml`](../.signpath/artifact-configuration.xml). Validate it - with *Upload an artifact sample*, using the `windows-unsigned` artifact of a Release run (or - the `ModbusTool-Windows` artifact of a CI run). + with *Upload an artifact sample*, using the `windows-unsigned` artifact of a Release run (kept + one day) or the MSI of a published release. 3. Create a signing policy (e.g. slug `release-signing`) with manual approval by the maintainer. 4. Create an API token for a user with *submitter* permission on the policy.