Skip to content

Commit

Permalink
More workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Jan 14, 2025
1 parent 98c6dde commit 2ffe7aa
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 61 deletions.
45 changes: 43 additions & 2 deletions .github/workflows/binaries.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
name: Binaries
name: Test

on:
push:
branches: ["main"]
tags:
- v*
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
release:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
- name: Run tests
run: cargo test
build:
name: Release ${{ matrix.platform.project }} - ${{ matrix.platform.release_for }}
if: github.event.pull_request.draft == false
strategy:
Expand Down Expand Up @@ -75,3 +88,31 @@ jobs:
with:
name: ${{ matrix.platform.bin }}-${{ matrix.platform.target }}
path: ${{ matrix.platform.name }}
release:
name: Release
needs:
- build
- test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: artifacts
pattern: codebook-lsp-*
- name: Make release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/codebook-lsp*
prerelease: true
fail_on_unmatched_files: true
generate_release_notes: true
draft: false
tag_name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 0 additions & 38 deletions .github/workflows/release.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 2ffe7aa

Please sign in to comment.