File tree Expand file tree Collapse file tree 6 files changed +21
-53
lines changed Expand file tree Collapse file tree 6 files changed +21
-53
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ version: 2
55updates :
66 - package-ecosystem : " cargo"
77 directory : " /"
8- target-branch : staging
8+ target-branch : development
99 schedule :
1010 interval : " daily"
Original file line number Diff line number Diff line change 11name : Build and test
22on :
33 pull_request :
4- branches : [main, staging ]
4+ branches : [development, release ]
55jobs :
6- build :
7- name : Build
8- runs-on : ${{ matrix.os }}
9- strategy :
10- matrix :
11- env : [ubuntu-64, macos-64, windows-64]
12- include :
13- - env : ubuntu-64
14- os : ubuntu-latest
15- toolchain : stable-x86_64-unknown-linux-gnu
16- - env : macos-64
17- os : macos-latest
18- toolchain : stable-x86_64-apple-darwin
19- - env : windows-64
20- os : windows-latest
21- toolchain : stable-x86_64-pc-windows-msvc
22- steps :
23- - name : Checkout
24- uses : actions/checkout@v2
25- - name : Setup toolchain ${{ matrix.toolchain }} for ${{ matrix.os }}
26- uses : actions-rs/toolchain@v1
27- with :
28- toolchain : ${{ matrix.toolchain }}
29- override : true
30- - name : Setup Cargo cache
31- uses : Swatinem/rust-cache@v2
32- - name : Build using ${{ matrix.toolchain }} for ${{ matrix.os }}
33- uses : actions-rs/cargo@v1
34- with :
35- command : build
36- args : --release --all-features
37- test :
38- name : Test
39- needs : build
6+ build_and_test :
7+ name : Build and test
408 runs-on : ${{ matrix.os }}
419 strategy :
4210 matrix :
Original file line number Diff line number Diff line change 11name : Check version bump
22on :
33 pull_request :
4- branches : [main ]
4+ branches : [release ]
55jobs :
66 check :
77 name : Check version bump
@@ -14,19 +14,19 @@ jobs:
1414 with :
1515 toolchain : stable-x86_64-unknown-linux-gnu
1616 override : true
17- - name : Read branch version
18- id : branch_version
17+ - name : Read source branch version
18+ id : source_version
1919 run : echo "version=$(cargo read-manifest | jq -r .version)" >> $GITHUB_OUTPUT
20- - name : Checkout main
20+ - name : Checkout release branch
2121 uses : actions/checkout@v2
2222 with :
23- ref : main
24- - name : Read main version
25- id : main_version
23+ ref : release
24+ - name : Read release branch version
25+ id : release_version
2626 run : echo "version=$(cargo read-manifest | jq -r .version)" >> $GITHUB_OUTPUT
2727 - name : Check version bump
2828 run : |
29- if [ "${{ steps.branch_version .outputs.version }}" == "${{ steps.main_version .outputs.version }}" ]; then
29+ if [ "${{ steps.source_version .outputs.version }}" == "${{ steps.release_version .outputs.version }}" ]; then
3030 echo "Missing version bump!"
3131 exit 1
3232 else
Original file line number Diff line number Diff line change 1- name : Deploy pre-release
1+ name : Publish pre-release
22on :
33 push :
4- branches : [staging ]
4+ branches : [development ]
55jobs :
66 github :
7- name : Deploy GitHub (pre-release)
7+ name : Publish GitHub (pre-release)
88 permissions :
99 contents : write
1010 runs-on : ubuntu-latest
3535 - name : Create release
3636 env :
3737 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub Actions
38- run : gh release create "${{ steps.commit_hash.outputs.commit_hash }}" --repo="$GITHUB_REPOSITORY" --target staging --title="Pre-Release ${{ steps.commit_hash.outputs.commit_hash }} (${{ steps.version.outputs.version }})" --generate-notes --prerelease "./target/package/${{ steps.crate_name.outputs.crate_name }}-${{ steps.version.outputs.version }}.crate"
38+ run : gh release create "${{ steps.commit_hash.outputs.commit_hash }}" --repo="$GITHUB_REPOSITORY" --target development --title="Pre-Release ${{ steps.commit_hash.outputs.commit_hash }} (${{ steps.version.outputs.version }})" --generate-notes --prerelease "./target/package/${{ steps.crate_name.outputs.crate_name }}-${{ steps.version.outputs.version }}.crate"
Original file line number Diff line number Diff line change 1- name : Deploy release
1+ name : Publish release
22on :
33 push :
4- branches : [main ]
4+ branches : [release ]
55jobs :
66 crates_io :
7- name : Deploy crates.io (release)
7+ name : Publish crates.io (release)
88 runs-on : ubuntu-latest
99 steps :
1010 - name : Checkout
2626 with :
2727 command : publish
2828 github :
29- name : Deploy GitHub (release)
29+ name : Publish GitHub (release)
3030 needs : crates_io
3131 permissions :
3232 contents : write
Original file line number Diff line number Diff line change 11<p align =" center " >
2- <img src =" https://raw.githubusercontent.com/Kitt3120/lum/main /.github/assets/portrait.png " width =" 512 " >
2+ <img src =" https://raw.githubusercontent.com/Kitt3120/lum/development /.github/assets/portrait.png " width =" 512 " >
33</p >
44
55# lum
You can’t perform that action at this time.
0 commit comments