-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (73 loc) · 2.43 KB
/
test-and-tag.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Test
on:
push:
branches:
- "*"
pull_request:
workflow_dispatch:
jobs:
rust-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run: rustup target add wasm32-unknown-unknown
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@v1.4.9
- run: cargo binstall --no-confirm dioxus-cli
- run: cargo binstall --no-confirm cargo-shuttle
- uses: extractions/setup-just@v1
- run: just lint
- run: just test
release:
if: github.ref == 'refs/heads/main'
permissions:
contents: write
needs:
- rust-checks
outputs:
version_bump: ${{ steps.current_version.outputs.current_version != steps.previous_version.outputs.previous_version }}
current_version: ${{ steps.current_version.outputs.current_version }}
previous_version: ${{ steps.previous_version.outputs.previous_version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- uses: extractions/setup-just@v1
- name: Get tags
run: git fetch --tags origin
- run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- run: rustup target add wasm32-unknown-unknown
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@v1.4.9
- shell: bash
run: cargo binstall --no-confirm cargo-edit
- shell: bash
run: cargo binstall --no-confirm cocogitto
- shell: bash
run: cargo binstall --no-confirm dioxus-cli
- shell: bash
run: cargo binstall --no-confirm cargo-shuttle
- shell: bash
env:
SHUTTLE_API_KEY: ${{ secrets.SHUTTLE_API_KEY }}
run: cargo shuttle login --api-key "$SHUTTLE_API_KEY"
- id: previous_version
run: |
cog get-version | tee .version
echo "previous_version=$( cat .version )" >> "$GITHUB_OUTPUT"
rm .version
shell: bash
- name: Semver release
id: release
run: |
git config --global user.name "cog-bot"
git config --global user.email "cog@example.com"
cog bump --auto
- id: current_version
run: |
cog get-version | tee .version
echo "current_version=$( cat .version )" >> "$GITHUB_OUTPUT"
rm .version
shell: bash