Skip to content

Commit

Permalink
Rework the build workflow
Browse files Browse the repository at this point in the history
- rename the workflow file to the conventional extension
- switch to using reusable workflows for
  - lint and test
  - building the release
  - building the Python wheel
  • Loading branch information
webbnh committed Apr 3, 2024
1 parent afb4150 commit 44f8a44
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 194 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build
on:
push:
branches:
- main
tags:
- v*
pull_request:
jobs:
lint_and_test:
name: lint and test
uses: arcalot/arcaflow-reusable-workflows/.github/workflows/go_lint_and_test.yaml@main
generate:
name: go generate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ vars.ARCALOT_GO_VERSION }}
- uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: go-test-${{ hashFiles('**/go.sum') }}
restore-keys: go-generate-
- name: Run go generate
run: ./.github/scripts/gogenerate.sh
release:
name: release
permissions:
contents: write
needs:
- lint_and_test
- generate
with:
for_release: ${{ startsWith(github.event.ref, 'refs/tags/') }}
uses: arcalot/arcaflow-reusable-workflows/.github/workflows/go_release.yaml@main
build_python_wheel:
name: build python wheel
needs:
- release
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
uses: arcalot/arcaflow-reusable-workflows/.github/workflows/build_python_wheel.yaml@main
194 changes: 0 additions & 194 deletions .github/workflows/build.yml

This file was deleted.

0 comments on commit 44f8a44

Please sign in to comment.