@r5n/sisyphus 0.13.0 → 0.13.1
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.
|
@@ -26,17 +26,18 @@ jobs:
|
|
|
26
26
|
|
|
27
27
|
- uses: oven-sh/setup-bun@v2
|
|
28
28
|
|
|
29
|
-
- name:
|
|
30
|
-
run:
|
|
29
|
+
- name: Reset release state
|
|
30
|
+
run: |
|
|
31
|
+
RELEASE_DIR="$(git rev-parse --git-path sisyphus/release)"
|
|
32
|
+
echo "SIS_RELEASE_DIR=$RELEASE_DIR" >> "$GITHUB_ENV"
|
|
33
|
+
rm -rf "$RELEASE_DIR"
|
|
31
34
|
|
|
32
|
-
# The cache key is sha-free and ref-stable so a workflow_dispatch recovery run
|
|
33
|
-
# restores the state saved by the failed merge-triggered run.
|
|
34
35
|
- name: Restore release state
|
|
35
|
-
uses: actions/cache/restore@
|
|
36
|
+
uses: actions/cache/restore@v6
|
|
36
37
|
with:
|
|
37
38
|
path: ${{ env.SIS_RELEASE_DIR }}
|
|
38
|
-
key: sisyphus-release-${{
|
|
39
|
-
restore-keys: sisyphus-release-${{
|
|
39
|
+
key: sisyphus-release-${{ github.run_id }}-${{ github.run_attempt }}
|
|
40
|
+
restore-keys: sisyphus-release-${{ github.run_id }}-
|
|
40
41
|
|
|
41
42
|
- name: Remove cached release lock
|
|
42
43
|
run: rm -f "$SIS_RELEASE_DIR/.write.lock" "$SIS_RELEASE_DIR"/.write.lock.*.owner "$SIS_RELEASE_DIR"/.write.lock.*.claim
|
|
@@ -66,9 +67,17 @@ jobs:
|
|
|
66
67
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
67
68
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
68
69
|
|
|
69
|
-
- name:
|
|
70
|
+
- name: Inspect release state
|
|
71
|
+
id: release-state
|
|
70
72
|
if: always()
|
|
71
|
-
|
|
73
|
+
run: |
|
|
74
|
+
if [ -f "$SIS_RELEASE_DIR/active.json" ] || ls "$SIS_RELEASE_DIR"/history/*.json >/dev/null 2>&1; then
|
|
75
|
+
echo "save=true" >> "$GITHUB_OUTPUT"
|
|
76
|
+
fi
|
|
77
|
+
|
|
78
|
+
- name: Save release state
|
|
79
|
+
if: always() && steps.release-state.outputs.save == 'true'
|
|
80
|
+
uses: actions/cache/save@v6
|
|
72
81
|
with:
|
|
73
82
|
path: ${{ env.SIS_RELEASE_DIR }}
|
|
74
|
-
key: sisyphus-release-${{
|
|
83
|
+
key: sisyphus-release-${{ github.run_id }}-${{ github.run_attempt }}
|
|
@@ -2,6 +2,8 @@ release:
|
|
|
2
2
|
stage: sisyphus
|
|
3
3
|
image: oven/bun:alpine
|
|
4
4
|
resource_group: sisyphus-release
|
|
5
|
+
variables:
|
|
6
|
+
GIT_STRATEGY: clone
|
|
5
7
|
cache:
|
|
6
8
|
key: "sisyphus-release-$CI_COMMIT_SHA"
|
|
7
9
|
policy: pull-push
|
|
@@ -35,3 +37,5 @@ release:
|
|
|
35
37
|
- bun install
|
|
36
38
|
- bun add --global @r5n/sisyphus
|
|
37
39
|
- if [ -f .git/sisyphus/release/active.json ]; then sis roll --resume; else sis roll --publish-only --yes; fi
|
|
40
|
+
after_script:
|
|
41
|
+
- if [ ! -f .git/sisyphus/release/active.json ] && ! ls .git/sisyphus/release/history/*.json >/dev/null 2>&1; then rm -rf .git/sisyphus/release; fi
|
package/package.json
CHANGED