Skip to content

Commit d621028

Browse files
committed
fix: CI/CD
1 parent ccce825 commit d621028

File tree

8 files changed

+23
-55
lines changed

8 files changed

+23
-55
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ version: 2
55
updates:
66
- package-ecosystem: "cargo"
77
directory: "/"
8-
target-branch: staging
8+
target-branch: development
99
schedule:
1010
interval: "daily"

.github/workflows/build_and_test.yml

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,10 @@
11
name: Build and test
22
on:
33
pull_request:
4-
branches: [main, staging]
4+
branches: [development, release]
55
jobs:
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:

.github/workflows/check_version_bump.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Check version bump
22
on:
33
pull_request:
4-
branches: [main]
4+
branches: [release]
55
jobs:
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

.github/workflows/deploy_prerelease.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Deploy pre-release
1+
name: Publish pre-release
22
on:
33
push:
4-
branches: [staging]
4+
branches: [development]
55
jobs:
66
github:
7-
name: Deploy GitHub (pre-release)
7+
name: Publish GitHub
88
permissions:
99
contents: write
1010
runs-on: ubuntu-latest
@@ -35,4 +35,4 @@ jobs:
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"

.github/workflows/deploy_release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Deploy release
1+
name: Publish release
22
on:
33
push:
4-
branches: [main]
4+
branches: [release]
55
jobs:
66
crates_io:
7-
name: Deploy crates.io (release)
7+
name: Publish crates.io
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
command: publish
2828
github:
29-
name: Deploy GitHub (release)
29+
name: Publish GitHub
3030
needs: crates_io
3131
permissions:
3232
contents: write

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lum"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
authors = ["Torben Schweren"]
55
edition = "2021"
66
rust-version = "1.80.0"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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

0 commit comments

Comments
 (0)