Skip to content

Commit

Permalink
Update GitHub actions (#188)
Browse files Browse the repository at this point in the history
We had some old GitHub actions that were using old node versions. This updates them, removes some that have been archived/deprecated, and fixes caching of go dependencies.
  • Loading branch information
IanVS authored Oct 25, 2024
1 parent 1ea8438 commit 1a968bf
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 50 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/flutterfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
flutter-version: '3.24.1'

- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
show-progress: false

- name: Check formating
run: dart format -l120 lib/ --set-exit-if-changed --suppress-analytics --output none
11 changes: 6 additions & 5 deletions .github/workflows/gofmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ jobs:
name: Run gofmt
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
show-progress: false

- name: Set up Go 1.22
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.22"
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
cache-dependency-path: nebula/go.sum

- name: Install goimports
working-directory: nebula
Expand Down
55 changes: 22 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ jobs:
runs-on: macos-latest

steps:
- name: Check out code
uses: actions/checkout@v4
with:
show-progress: false

- name: Set up Go 1.22
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.22"
cache-dependency-path: nebula/go.sum

- uses: actions/setup-java@v2
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
Expand All @@ -26,9 +32,6 @@ jobs:
with:
flutter-version: '3.24.1'

- name: Check out code
uses: actions/checkout@v3

- name: Install the appstore connect key material
env:
AC_API_KEY_SECRET_BASE64: ${{ secrets.AC_API_KEY_SECRET_BASE64 }}
Expand Down Expand Up @@ -95,7 +98,7 @@ jobs:
fi
- name: Collect iOS artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MobileNebula.ipa
path: ios/MobileNebula.ipa
Expand All @@ -119,7 +122,7 @@ jobs:
fi
- name: Collect Android artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MobileNebula.aab
path: build/app/outputs/bundle/release/app-release.aab
Expand All @@ -138,36 +141,22 @@ jobs:
cd android
fastlane release
- name: Create Release
- name: Rename app bundle
run: |
mv build/app/outputs/bundle/release/app-release.aab \
build/app/outputs/bundle/release/MobileNebula.aab
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
name: Release ${{ github.ref }}
draft: true
prerelease: false

- name: Upload release Android app
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/app/outputs/bundle/release/app-release.aab
asset_name: MobileNebula.aab
asset_content_type: text/plain

- name: Upload release iOS app
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ios/MobileNebula.ipa
asset_name: MobileNebula.ipa
asset_content_type: text/plain
token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/app/outputs/bundle/release/MobileNebula.aab
ios/MobileNebula.ipa
- name: Create Sentry release
uses: getsentry/action-release@v1
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ jobs:
name: Android
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
show-progress: false

- name: Set up Go 1.22
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.22"
cache-dependency-path: nebula/go.sum

- uses: actions/setup-java@v2
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
Expand All @@ -27,9 +33,6 @@ jobs:
with:
flutter-version: '3.24.1'

- name: Check out code
uses: actions/checkout@v3

- name: install dependencies
env:
TOKEN: ${{ secrets.MACHINE_USER_PAT }}
Expand Down Expand Up @@ -74,9 +77,9 @@ jobs:
unzip -p build/app/outputs/apk/debug/app-debug.apks universal.apk > build/app/outputs/apk/debug/app-debug.apk
- name: Collect debug apk
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: app-debug.apk
name: MobileNebulaDebug.apk
path: build/app/outputs/apk/debug/app-debug.apk
retention-days: 60

Expand All @@ -85,19 +88,22 @@ jobs:
runs-on: macos-latest

steps:
- name: Check out code
uses: actions/checkout@v4
with:
show-progress: false

- name: Set up Go 1.22
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.22"
cache-dependency-path: nebula/go.sum

- name: Install flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.1'

- name: Check out code
uses: actions/checkout@v3

- name: install dependencies
run: |
go install golang.org/x/mobile/cmd/gomobile@latest
Expand Down

0 comments on commit 1a968bf

Please sign in to comment.