|
7 | 7 |
|
8 | 8 | jobs: |
9 | 9 | deploy: |
10 | | - runs-on: ubuntu-22.04 |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
11 | 12 | steps: |
12 | 13 | - name: Checkout main branch |
13 | | - uses: actions/checkout@v3 |
| 14 | + uses: actions/checkout@v4 |
14 | 15 |
|
15 | 16 | - name: Checkout gh-pages branch |
16 | | - uses: actions/checkout@v3 |
| 17 | + uses: actions/checkout@v4 |
17 | 18 | with: |
18 | 19 | ref: gh-pages |
19 | 20 | path: gh-pages-repo |
20 | 21 |
|
| 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.8 |
21 | 26 |
|
22 | | - |
23 | | - - name: Setup Dart SDK Step 1 |
24 | | - run: sudo apt-get update |
25 | | - - name: Setup Dart SDK Step 2 |
26 | | - run: sudo apt-get install apt-transport-https |
27 | | - - name: Setup Dart SDK Step 3 |
28 | | - run: sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' |
29 | | - - name: Setup Dart SDK Step 4 |
30 | | - run: sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' |
31 | | - - name: Setup Dart SDK Step 5 |
32 | | - run: wget -O /tmp/dart_3.5.4-1_amd64.deb https://storage.googleapis.com/dart-archive/channels/stable/release/3.5.4/linux_packages/dart_3.5.4-1_amd64.deb |
33 | | - - name: Setup Dart SDK Step 6 |
34 | | - run: sudo apt install /tmp/dart_3.5.4-1_amd64.deb |
35 | 27 | - name: Install dependencies |
36 | | - run: PATH="$PATH:/usr/lib/dart/bin" dart pub get |
37 | | - |
38 | | - - name: Install webdev |
39 | | - run: PATH="$PATH:/usr/lib/dart/bin" dart pub global activate webdev |
| 28 | + run: dart pub get |
40 | 29 |
|
| 30 | + - name: Activate webdev |
| 31 | + run: dart pub global activate webdev |
41 | 32 |
|
42 | 33 | - name: Build into gh-pages repo |
43 | | - run: PATH="$PATH:/usr/lib/dart/bin" dart pub global run webdev build -o web:/tmp/scadnano ; cp -r /tmp/scadnano/* gh-pages-repo |
| 34 | + run: dart pub global run webdev build -o web:/tmp/scadnano ; cp -r /tmp/scadnano/* gh-pages-repo |
| 35 | + |
44 | 36 | - name: Retrieve version |
45 | | - run: echo "VERSION=$(cat lib/src/constants.dart | grep 'const String CURRENT_VERSION = .*' | grep -oP '\d+\.\d+\.\d+')" >> $GITHUB_ENV |
| 37 | + run: echo "VERSION=$(cat lib/src/constants.dart | grep 'const String CURRENT_VERSION = .*' | grep -oP '\d+\.\d+\.\d+')" >> $GITHUB_ENV |
| 38 | + |
46 | 39 | - name: Build into gh-pages-repo/VERSION |
47 | 40 | run: | |
48 | 41 | if [ "$VERSION" != "" ]; then |
49 | | - PATH="$PATH:/usr/lib/dart/bin" dart pub global run webdev build -o web:gh-pages-repo/v$VERSION |
| 42 | + dart pub global run webdev build -o web:gh-pages-repo/v$VERSION |
50 | 43 | else |
51 | 44 | echo "::warning deploying VERSION skipped because VERSION number could not be found" |
52 | 45 | fi |
|
0 commit comments