Skip to content

Commit dfd7aa3

Browse files
Update rust.yml
1 parent 1644f8e commit dfd7aa3

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

.github/workflows/rust.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,25 @@ jobs:
3030
run: cargo test --verbose
3131
- name: Run benchmarks
3232
run: cargo bench --verbose
33-
34-
- name: Get Latest Tag
35-
id: get_latest_tag
36-
uses: actions/github-script@v6
37-
with:
38-
script: |
39-
if (github && github.repos && typeof github.repos.listTags === 'function') {
40-
const tags = await github.repos.listTags({
41-
owner: context.repo.owner,
42-
repo: context.repo.repo
43-
});
44-
45-
if (tags.data.length === 0) {
46-
core.setOutput('tag', 'v0.0.0'); // Default to v0.0.0 if no tags exist
47-
} else {
48-
core.setOutput('tag', tags.data[0].name);
49-
}
50-
} else {
51-
core.setOutput('tag', 'v0.0.0'); // Fallback if listTags is unavailable
52-
}
53-
33+
- name: Get Latest Tag
34+
id: get_latest_tag
35+
uses: actions/github-script@v6
36+
with:
37+
script: |
38+
if (github && github.repos && typeof github.repos.listTags === 'function') {
39+
const tags = await github.repos.listTags({
40+
owner: context.repo.owner,
41+
repo: context.repo.repo
42+
});
43+
44+
if (tags.data.length === 0) {
45+
core.setOutput('tag', 'v0.0.0'); // Default to v0.0.0 if no tags exist
46+
} else {
47+
core.setOutput('tag', tags.data[0].name);
48+
}
49+
} else {
50+
core.setOutput('tag', 'v0.0.0'); // Fallback if listTags is unavailable
51+
}
5452
- name: Increment Tag
5553
id: increment_tag
5654
run: |

0 commit comments

Comments
 (0)