-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2dc7a03
commit 58585ac
Showing
34 changed files
with
771 additions
and
418 deletions.
There are no files selected for viewing
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,36 @@ | ||
name: "Prepare" | ||
description: "Prepare and tests the project" | ||
|
||
inputs: | ||
sdk-version: | ||
description: "Dart SDK version" | ||
required: false | ||
default: "stable" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: ${{ inputs.sdk-version }} | ||
|
||
- name: Cache Dart dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.pub-cache" | ||
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-dart- | ||
- name: Get dependencies | ||
run: dart pub get | ||
shell: bash | ||
|
||
- name: Build version | ||
run: ./scripts/build_version.dart | ||
shell: bash | ||
|
||
- name: Analyze | ||
run: dart analyze --fatal-infos --fatal-warnings . | ||
shell: bash |
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,13 @@ | ||
name: "Test Step" | ||
description: "Tests the project" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Generate git cache | ||
run: ./bin/fvm.dart install master | ||
shell: bash | ||
|
||
- name: Run tests | ||
run: dart test | ||
shell: bash |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -6,23 +6,79 @@ on: | |
types: [published, released] | ||
|
||
jobs: | ||
common: | ||
uses: ./.github/workflows/common.yml | ||
test: | ||
name: Test | ||
uses: ./.github/workflows/test.yml | ||
|
||
release: | ||
name: Release | ||
needs: common | ||
needs: test | ||
runs-on: ubuntu-latest | ||
env: | ||
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dart-lang/[email protected] | ||
|
||
- run: dart pub get | ||
- name: Prepare environment | ||
uses: ./.github/actions/prepare/action.yml | ||
|
||
- name: Deploy Github | ||
run: dart pub run grinder pkg-github-all | ||
|
||
- name: Deploy to Pub | ||
run: dart pub run grinder pkg-pub-deploy | ||
|
||
deploy-windows: | ||
name: Cholatey Deploy (Windows) | ||
needs: release | ||
runs-on: windows-latest | ||
env: | ||
CHOCOLATEY_TOKEN: ${{ secrets.CHOCOLATEY_TOKEN }} | ||
steps: | ||
- name: Prepare environment | ||
uses: ./.github/actions/prepare/action.yml | ||
|
||
- name: Deploy Chocolatey (Windows) | ||
run: dart pub run grinder pkg-chocolatey-deploy | ||
|
||
deploy-homebrew: | ||
name: Deploy Homebrew | ||
runs-on: ubuntu-latest | ||
needs: release | ||
env: | ||
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }} | ||
GITHUB_TOKEN: ${{ secrets.HOMEBREW_FVM_GH_TOKEN }} | ||
|
||
steps: | ||
- name: Prepare environment | ||
uses: ./.github/actions/prepare/action.yml | ||
|
||
- name: Deploy to Homebrew | ||
run: dart pub run grinder pkg-homebrew-update | ||
|
||
deploy-docker: | ||
name: Docker Deploy (latest) | ||
runs-on: ubuntu-latest | ||
needs: release | ||
steps: | ||
- name: Prepare environment | ||
uses: ./.github/actions/prepare/action.yml | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push (latest) | ||
id: docker_build_latest | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: ./.docker/Dockerfile | ||
push: true | ||
tags: leoafarias/fvm:{{ github.event.release.tag_name }} |
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
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 |
---|---|---|
|
@@ -46,3 +46,4 @@ test/support_assets/dart_package/lib/src/version.dart | |
.fvm/versions | ||
coverage/test | ||
.failed_tracker | ||
coverage/html |
Oops, something went wrong.