Skip to content

Commit 6054530

Browse files
authored
Merge pull request #1082 from UC-Davis-molecular-computing/fix/GH-1081-update-dart-sdk-and-standalone-actions
Fixes #1081 - Update Dart SDK and Standalone Actions
2 parents 175d90d + 272d3b9 commit 6054530

7 files changed

Lines changed: 31 additions & 21 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Setup Dart SDK
2+
inputs:
3+
sdk:
4+
default: "3.11"
5+
description: The Dart SDK to use. Defaults to 3.11 if none is provided.
6+
runs:
7+
using: composite
8+
steps:
9+
- uses: dart-lang/setup-dart@v1
10+
with:
11+
sdk: ${{ inputs.sdk }}

.github/workflows/dart.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: Setup Dart SDK
17-
uses: dart-lang/setup-dart@v1 # https://github.com/dart-lang/setup-dart
18-
with:
19-
sdk: 3.11
17+
uses: ./.github/actions/setup-dart
2018

2119
- name: Install dependencies
2220
run: dart pub get

.github/workflows/dart_formatting.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ jobs:
1313
- name: Checkout branch
1414
uses: actions/checkout@v4
1515

16-
- name: Setup Dart SDK # Using Dart 3.8 to match pubspec.yaml constraint
17-
uses: dart-lang/setup-dart@v1 # https://github.com/dart-lang/setup-dart
18-
with:
19-
sdk: 3.11
16+
- name: Setup Dart SDK
17+
uses: ./.github/actions/setup-dart
2018

2119
- name: Install dependencies
2220
run: dart pub get

.github/workflows/gh-pages-dev.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ jobs:
2020
ref: gh-pages
2121
path: gh-pages-repo
2222

23-
- name: Setup Dart SDK # Using Dart 3.8 to match pubspec.yaml constraint
24-
uses: dart-lang/setup-dart@v1 # https://github.com/dart-lang/setup-dart
25-
with:
26-
sdk: 3.11
23+
- name: Setup Dart SDK
24+
uses: ./.github/actions/setup-dart
2725

2826
- name: Install dependencies
2927
run: dart pub get

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ jobs:
1919
ref: gh-pages
2020
path: gh-pages-repo
2121

22-
- name: Setup Dart SDK # Using Dart 3.8 to match pubspec.yaml constraint
23-
uses: dart-lang/setup-dart@v1 # https://github.com/dart-lang/setup-dart
24-
with:
25-
sdk: 3.11
22+
- name: Setup Dart SDK
23+
uses: ./.github/actions/setup-dart
2624

2725
- name: Install dependencies
2826
run: dart pub get

.github/workflows/release-and-upload-artifacts.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@ jobs:
4444
runs-on: ${{ matrix.os }}
4545
steps:
4646
# Setup Builder
47-
- uses: actions/checkout@v4
48-
- uses: actions/setup-node@v4
49-
- uses: dart-lang/setup-dart@v1
50-
with:
51-
sdk: 3.8
47+
- name: Checkout Repository
48+
uses: actions/checkout@v6
49+
50+
- name: Setup Node
51+
uses: actions/setup-node@v6
52+
53+
- name: Setup Dart SDK
54+
uses: ./.github/actions/setup-dart
5255

5356
- name: Install ImageMagick
5457
shell: bash
@@ -80,6 +83,7 @@ jobs:
8083
- name: Upload Build Artifact
8184
uses: actions/upload-artifact@v4
8285
with:
86+
retention-days: 1 # reduce from 90-day default. This is only required for passing artifacts between jobs.
8387
name: build-${{ matrix.os }}
8488
path: |
8589
standalone/dist/scadnano*.*

standalone/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
}
4646
},
4747
"scripts": {
48-
"init": "cd .. && dart pub get && dart pub global activate webdev && webdev build -- --delete-conflicting-outputs",
48+
"init": "npm run setup:state_actions && npm run setup:reducers && npm run setup:webdev",
49+
"setup:webdev": "cd .. && dart pub get && dart pub global activate webdev && webdev build -- --delete-conflicting-outputs",
50+
"setup:state_actions": "cd .. && dart pub get && cd scadnano_state_actions && dart run build_runner build --delete-conflicting-outputs",
51+
"setup:reducers": "cd .. && dart pub get && cd scadnano_reducers && dart run build_runner build --delete-conflicting-outputs",
4952
"dev": "npm run init && electron-forge start",
5053
"package": "electron-builder --dir",
5154
"build:win": "npm run init && electron-builder --win --publish never",

0 commit comments

Comments
 (0)