Skip to content

Commit

Permalink
ci: don't dev build on tag push & build on release beforehand
Browse files Browse the repository at this point in the history
  • Loading branch information
angeloanan committed Apr 13, 2024
1 parent 1d7f0a8 commit f61f3b6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 10 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
on: push
on:
push:
branches:
- "*"

env:
CARGO_TERM_COLOR: always

name: Development Build
jobs:
release:
build:
name: ${{ matrix.target }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -44,6 +47,6 @@ jobs:
- name: Upload Build Artifacts
uses: actions/upload-artifact@master
with:
name: ${{ matrix.target }}
name: bmap-server-${{ matrix.target }}
path: |
target/release/bmap-server
target/release/bmap-server*
41 changes: 35 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,28 @@ env:
CARGO_TERM_COLOR: always

jobs:
release:
name: Release Build - ${{ matrix.platform }}
build:
name: Build ${{ matrix.target }}
strategy:
fail-fast: false
fail-fast: true
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
include:
- name: linux-amd64
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: linux-i686
runner: ubuntu-latest
target: i686-unknown-linux-gnu
- name: linux-arm64
runner: ubuntu-latest
target: aarch64-unknown-linux-gnu
- name: macos-amd64
runner: macos-latest
target: x86_64-apple-darwin
- name: macos-arm64
runner: macos-latest
target: aarch64-apple-darwin
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@master
- name: Setup Rust Toolchain
Expand All @@ -28,8 +43,22 @@ jobs:
command: build
args: --release

- name: Upload Build Artifacts
uses: actions/upload-artifact@master
with:
name: bmap-server-${{ matrix.target }}
path: |
target/release/bmap-server*
release:
name: Create release
needs: build
runs-on: "ubuntu-latest"
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@master
- name: Create a Release
uses: softprops/action-gh-release@v2
with:
files: |
target/release/bmap-server
bmap-server*

0 comments on commit f61f3b6

Please sign in to comment.