-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLATFORM-1365]: Migrate positional.rs to GHA (#55)
* Implement CI/CD with GHA * Refactor cd and makefile * Add --workspace * Tests and fmt run with --workspace flag * Remove drone.yml * Remove --workspace flag from fmt-check * Check package version in cd * Remove build script * Fix grep in file in cd * Add pss as codeowners
- Loading branch information
1 parent
33150a0
commit 3bc9986
Showing
8 changed files
with
87 additions
and
432 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
* @primait/shared-services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: CD | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/install-action@cargo-release | ||
- uses: taiki-e/install-action@cargo-make | ||
- name: Get version | ||
run: | | ||
POSITIONAL_VERSION=$(grep -m1 '^version' positional/Cargo.toml | cut -d'"' -f2) | ||
POSITIONAL_DERIVE_VERSION=$(grep -m1 '^version' positional_derive/Cargo.toml | cut -d'"' -f2) | ||
echo "POSITIONAL_VERSION=$POSITIONAL_VERSION" >> $GITHUB_ENV | ||
echo "POSITIONAL_DERIVE_VERSION=$POSITIONAL_DERIVE_VERSION" >> $GITHUB_ENV | ||
- name: Check version | ||
if: ${{ github.event.release.tag_name != env.POSITIONAL_VERSION || github.event.release.tag_name != env.POSITIONAL_DERIVE_VERSION }} | ||
run: | | ||
echo "Github ref tag [${{ github.event.release.tag_name }}] is different from positional Cargo.toml version [${{ env.POSITIONAL_VERSION }}] or positional_derive Cargo.toml version [${{ env.POSITIONAL_DERIVE_VERSION }}]" | ||
exit 1 | ||
- run: cargo login "$CARGO_AUTH_KEY" | ||
env: | ||
CARGO_AUTH_KEY: ${{ secrets.CARGO_AUTH_KEY }} | ||
- run: cargo make release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
lint: | ||
# Avoid duplicate jobs on PR from a branch on the same repo | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: taiki-e/install-action@cargo-make | ||
- run: cargo make fmt-check | ||
- run: cargo make clippy | ||
- run: cargo make docs | ||
|
||
test: | ||
# Avoid duplicate jobs on PR from a branch on the same repo | ||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: taiki-e/install-action@cargo-make | ||
- run: cargo make test | ||
|
||
alls-green: | ||
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) | ||
runs-on: ubuntu-latest | ||
needs: | ||
- lint | ||
- test | ||
steps: | ||
- run: ${{ !contains(needs.*.result, 'failure') }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.