chore: updated github code #296
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
name: main | |
permissions: | |
id-token: write # Enable OIDC | |
pull-requests: write | |
contents: write | |
packages: write | |
issues: write | |
on: [pull_request, push] | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.3.0' | |
channel: 'stable' | |
- name: Clean Dependencies | |
run: flutter clean | |
- name: Install Dependencies | |
run: flutter packages get | |
- name: Format | |
run: flutter format --set-exit-if-changed lib test | |
- name: Analyze | |
run: flutter analyze lib test | |
- name: Run tests | |
run: flutter test --no-pub --coverage --test-randomize-ordering-seed random | |
prerelease: | |
runs-on: ubuntu-latest | |
needs: | |
- lint-test | |
# if: github.ref == 'refs/heads/main' todo! will reenable | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run Release | |
uses: google-github-actions/release-please-action@v3 | |
with: | |
release-type: dart | |
package-name: flutter-unity-widget | |
default-branch: main | |
signoff: "Rex Raphael <[email protected]>" | |
token: ${{ secrets.GIT_TOKEN }} | |