-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from sliit-foss/development
Graduation
- Loading branch information
Showing
45 changed files
with
977 additions
and
143 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,66 @@ | ||
name: release | ||
description: Base package release action | ||
inputs: | ||
credentials: | ||
description: 'Pub.dev credentials' | ||
required: true | ||
options: | ||
description: 'Melos version options' | ||
required: false | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Flutter SDK | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: 3.x | ||
channel: 'stable' | ||
cache: true | ||
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' | ||
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' | ||
|
||
- name: Configure git | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
shell: bash | ||
|
||
- name: Install dependencies | ||
run: | | ||
dart pub global activate melos | ||
flutter pub get | ||
melos bootstrap | ||
shell: bash | ||
|
||
- name: Setup Pub Credentials | ||
run: | | ||
mkdir -p ~/.config | ||
cd ~/.config | ||
mkdir dart | ||
echo "${{ inputs.credentials }}" | base64 --decode > ~/.config/dart/pub-credentials.json | ||
shell: bash | ||
|
||
- name: Populate prerequisities | ||
run: | | ||
for dir in packages; do | ||
cd "$dir" && for p in */; do | ||
cp ../{.pubignore,LICENSE} "$p" | ||
done && cd .. | ||
done | ||
shell: bash | ||
|
||
- name: Bump versions | ||
run: | | ||
melos version --yes --message="CI: sync release" --diff=$(git log --skip=1 -n 1 --pretty=format:"%H") ${{ inputs.options }} | ||
shell: bash | ||
|
||
- name: Publish packages | ||
run: melos publish --no-published --no-dry-run --yes | ||
shell: bash | ||
|
||
- name: Update release info | ||
run: | | ||
git add . && git commit --amend --no-edit || true | ||
git config pull.ff true | ||
git pull --rebase && git push origin | ||
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,24 @@ | ||
name: test | ||
description: Base unit test action | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Flutter SDK | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: 3.x | ||
channel: 'stable' | ||
cache: true | ||
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' | ||
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' | ||
|
||
- name: Install dependencies | ||
run: | | ||
dart pub global activate melos | ||
flutter pub get | ||
melos bootstrap | ||
shell: bash | ||
|
||
- name: Execute tests | ||
run: melos exec --diff=$(git log --skip=1 -n 1 --pretty=format:"%H") -- flutter test | ||
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,35 @@ | ||
name: CI Prerelease | ||
|
||
on: | ||
push: | ||
branches: | ||
- development | ||
|
||
jobs: | ||
unit-tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run Tests 🧪 | ||
uses: ./.github/actions/test | ||
|
||
release: | ||
name: Release packages | ||
runs-on: ubuntu-latest | ||
needs: unit-tests | ||
steps: | ||
- name: Checkout repository 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Initiate release 📦 | ||
uses: ./.github/actions/release | ||
with: | ||
credentials: ${{ secrets.PUB_CREDENTIALS }} | ||
options: "--prerelease --preid=blizzard" |
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,35 @@ | ||
name: CI Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
unit-tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run Tests 🧪 | ||
uses: ./.github/actions/test | ||
|
||
release: | ||
name: Release packages | ||
runs-on: ubuntu-latest | ||
needs: unit-tests | ||
steps: | ||
- name: Checkout repository 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Initiate release 📦 | ||
uses: ./.github/actions/release | ||
with: | ||
credentials: ${{ secrets.PUB_CREDENTIALS }} | ||
options: "--graduate" |
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,17 @@ | ||
name: CI Tests | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
unit-tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository 🛎️ | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run Tests 🧪 | ||
uses: ./.github/actions/test |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
dart format . --fix | ||
dart run lint_staged | ||
dart run lint_staged | ||
git add . |
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 |
---|---|---|
|
@@ -5,3 +5,6 @@ test/ | |
.gitignore | ||
analysis_options.yaml | ||
pub_login.sh | ||
melos_flodash.iml | ||
CHANGELOG.md | ||
CONTRIBUTING.md |
Oops, something went wrong.