Skip to content

Commit

Permalink
Better GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinullrich committed Dec 9, 2023
1 parent efa8ef6 commit f0e3341
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ on:

jobs:
build:

runs-on: ubuntu-latest

container:
image: google/dart:latest

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: pub get
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: stable

- name: Install dependencies
run: dart pub get

- name: Run tests
run: pub run test
- name: Run tests
run: dart pub run test
21 changes: 10 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ on:
types:
- published

# Publish using custom workflow
jobs:
publishing:

publish:
permissions:
id-token: write # Required for authentication using OIDC
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Publish package
uses: k-paxian/dart-package-publisher@v1.2
with:
accessToken: ${{ secrets.GOOGLE_OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.GOOGLE_OAUTH_REFRESH_TOKEN }}
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Publish
run: dart pub publish --force

0 comments on commit f0e3341

Please sign in to comment.