@r5n/sisyphus 0.15.0 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +159 -159
- package/dist/templates/github/sis-release.yml +33 -1
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ jobs:
|
|
|
15
15
|
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'sisyphus-release'))
|
|
16
16
|
runs-on: ubuntu-latest
|
|
17
17
|
permissions:
|
|
18
|
+
actions: read
|
|
18
19
|
contents: write
|
|
19
20
|
id-token: write
|
|
20
21
|
steps:
|
|
@@ -33,12 +34,33 @@ jobs:
|
|
|
33
34
|
rm -rf "$RELEASE_DIR"
|
|
34
35
|
|
|
35
36
|
- name: Restore release state
|
|
37
|
+
if: github.server_url != 'https://github.com'
|
|
36
38
|
uses: actions/cache/restore@v6
|
|
37
39
|
with:
|
|
38
40
|
path: ${{ env.SIS_RELEASE_DIR }}
|
|
39
41
|
key: sisyphus-release-${{ github.run_id }}-${{ github.run_attempt }}
|
|
40
42
|
restore-keys: sisyphus-release-${{ github.run_id }}-
|
|
41
43
|
|
|
44
|
+
- name: Find release state of an earlier attempt
|
|
45
|
+
id: earlier-attempt
|
|
46
|
+
if: github.server_url == 'https://github.com' && github.run_attempt > 1
|
|
47
|
+
env:
|
|
48
|
+
GH_TOKEN: ${{ github.token }}
|
|
49
|
+
run: |
|
|
50
|
+
set -eo pipefail
|
|
51
|
+
ARTIFACTS="$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/artifacts")"
|
|
52
|
+
SAVED="$(jq '[.artifacts[] | select(.name == "sisyphus-release-state" and (.expired | not))] | length' <<<"$ARTIFACTS")"
|
|
53
|
+
if [ "$SAVED" != "0" ]; then
|
|
54
|
+
echo "found=true" >> "$GITHUB_OUTPUT"
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
- name: Restore release state from the artifact
|
|
58
|
+
if: steps.earlier-attempt.outputs.found == 'true'
|
|
59
|
+
uses: actions/download-artifact@v8
|
|
60
|
+
with:
|
|
61
|
+
name: sisyphus-release-state
|
|
62
|
+
path: ${{ env.SIS_RELEASE_DIR }}
|
|
63
|
+
|
|
42
64
|
- name: Remove cached release lock
|
|
43
65
|
run: rm -f "$SIS_RELEASE_DIR/.write.lock" "$SIS_RELEASE_DIR"/.write.lock.*.owner "$SIS_RELEASE_DIR"/.write.lock.*.claim
|
|
44
66
|
|
|
@@ -77,8 +99,18 @@ jobs:
|
|
|
77
99
|
fi
|
|
78
100
|
|
|
79
101
|
- name: Save release state
|
|
80
|
-
if: always() && steps.release-state.outputs.save == 'true'
|
|
102
|
+
if: always() && github.server_url != 'https://github.com' && steps.release-state.outputs.save == 'true'
|
|
81
103
|
uses: actions/cache/save@v6
|
|
82
104
|
with:
|
|
83
105
|
path: ${{ env.SIS_RELEASE_DIR }}
|
|
84
106
|
key: sisyphus-release-${{ github.run_id }}-${{ github.run_attempt }}
|
|
107
|
+
|
|
108
|
+
- name: Save release state as an artifact
|
|
109
|
+
if: always() && github.server_url == 'https://github.com' && steps.release-state.outputs.save == 'true'
|
|
110
|
+
uses: actions/upload-artifact@v7
|
|
111
|
+
with:
|
|
112
|
+
name: sisyphus-release-state
|
|
113
|
+
path: ${{ env.SIS_RELEASE_DIR }}
|
|
114
|
+
include-hidden-files: true
|
|
115
|
+
overwrite: true
|
|
116
|
+
retention-days: 30
|
package/package.json
CHANGED