Skip to content

Commit 53bddd6

Browse files
authored
chore: add workflows/Publish (#9)
1 parent 8a23ce5 commit 53bddd6

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/Publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags: [v*]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
ref: main
18+
fetch-depth: 0
19+
20+
- run: |
21+
BRANCHS=$(git branch --contains ${{ github.ref_name }})
22+
set -- $BRANCHS
23+
for BRANCH in $BRANCHS ; do
24+
if [[ "$BRANCH" == "main" ]]; then
25+
exit 0
26+
fi
27+
done
28+
exit 1
29+
30+
- name: Create release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: |
34+
gh release create ${{ github.ref_name }} --generate-notes
35+
36+
- name: Publish packages
37+
env:
38+
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
39+
run: |
40+
cargo publish -p rusty_mujoco

examples/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# `rusty_mujoco` Examples
2+
13
## `visualize_left_object.rs`
24

35
This example leaves a single object in the scene and visualizes it.

0 commit comments

Comments
 (0)