Skip to content

Commit 9d08990

Browse files
committed
Release workflows now use template-style checkout retry and auto-prerelease detection from hyphenated tags
1 parent b0a57db commit 9d08990

2 files changed

Lines changed: 44 additions & 2 deletions

File tree

.github/workflows/lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Lint (Advisory)
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- feature/**
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
metadata_lint:
15+
name: Metadata Lint (advisory)
16+
runs-on: ubuntu-latest
17+
continue-on-error: true
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Arduino Lint
23+
uses: arduino/arduino-lint-action@v1
24+
with:
25+
library-manager: false
26+
project-type: library

.github/workflows/release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,23 @@ jobs:
7878
await sleep(pollMs);
7979
}
8080
81-
- name: Checkout
81+
- name: Checkout repository (attempt 1)
82+
id: checkout_attempt_1
83+
continue-on-error: true
84+
uses: actions/checkout@v4
85+
with:
86+
fetch-depth: 0
87+
88+
- name: Checkout repository (attempt 2)
89+
id: checkout_attempt_2
90+
if: ${{ steps.checkout_attempt_1.outcome == 'failure' }}
91+
continue-on-error: true
92+
uses: actions/checkout@v4
93+
with:
94+
fetch-depth: 0
95+
96+
- name: Checkout repository (attempt 3)
97+
if: ${{ steps.checkout_attempt_1.outcome == 'failure' && steps.checkout_attempt_2.outcome == 'failure' }}
8298
uses: actions/checkout@v4
8399
with:
84100
fetch-depth: 0
@@ -99,7 +115,7 @@ jobs:
99115
uses: softprops/action-gh-release@v2
100116
with:
101117
draft: false
102-
prerelease: false
118+
prerelease: ${{ contains(github.ref_name, '-') }}
103119
generate_release_notes: false
104120
body_path: release-changelog.md
105121
env:

0 commit comments

Comments
 (0)