Skip to content

Commit 1cf2b2b

Browse files
committed
Update GitHub Actions to v4 to fix workflow errors
1 parent 9541b52 commit 1cf2b2b

File tree

3 files changed

+40
-12
lines changed

3 files changed

+40
-12
lines changed

.github/workflows/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@ This job builds the Android APK and:
5555
- Uploads the APK as an artifact
5656
- Adds the APK to the GitHub release (if triggered by a tag)
5757

58+
## GitHub Actions Used
59+
60+
This workflow uses the following GitHub Actions:
61+
62+
- `actions/checkout@v4`: Checks out the repository
63+
- `actions/setup-java@v4`: Sets up JDK for Android builds
64+
- `actions/cache@v4`: Caches Cargo dependencies for faster builds
65+
- `actions/upload-artifact@v4`: Uploads build artifacts
66+
- `actions/download-artifact@v4`: Downloads artifacts for releases
67+
- `actions-rs/toolchain@v1`: Sets up Rust toolchain
68+
- `actions-rs/cargo@v1`: Runs Cargo commands
69+
- `softprops/action-gh-release@v1`: Creates GitHub releases
70+
- `android-actions/setup-android@v2`: Sets up Android SDK
71+
5872
## Usage
5973

6074
### Regular Development
@@ -82,4 +96,4 @@ To modify the workflow:
8296

8397
1. Edit the `.github/workflows/ci.yml` file
8498
2. Commit and push your changes
85-
3. The updated workflow will be used for subsequent runs
99+
3. The updated workflow will be used for subsequent runs

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Checkout repository
36-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3737

3838
- name: Install Rust toolchain
3939
uses: actions-rs/toolchain@v1
@@ -44,7 +44,7 @@ jobs:
4444
target: ${{ matrix.target }}
4545

4646
- name: Cache dependencies
47-
uses: actions/cache@v3
47+
uses: actions/cache@v4
4848
with:
4949
path: |
5050
~/.cargo/registry
@@ -112,7 +112,7 @@ jobs:
112112
cargo test --all-features
113113
114114
- name: Upload artifacts
115-
uses: actions/upload-artifact@v3
115+
uses: actions/upload-artifact@v4
116116
with:
117117
name: opensvm-dioxus-${{ matrix.os }}-${{ matrix.platform }}
118118
path: |
@@ -125,10 +125,10 @@ jobs:
125125
runs-on: ubuntu-latest
126126
steps:
127127
- name: Checkout repository
128-
uses: actions/checkout@v3
128+
uses: actions/checkout@v4
129129

130130
- name: Download all artifacts
131-
uses: actions/download-artifact@v3
131+
uses: actions/download-artifact@v4
132132
with:
133133
path: artifacts
134134

@@ -176,15 +176,15 @@ jobs:
176176
runs-on: macos-latest
177177
steps:
178178
- name: Checkout repository
179-
uses: actions/checkout@v3
179+
uses: actions/checkout@v4
180180

181181
- name: Set up Git
182182
run: |
183183
git config --global user.name "GitHub Actions"
184184
git config --global user.email "[email protected]"
185185
186186
- name: Download macOS artifact
187-
uses: actions/download-artifact@v3
187+
uses: actions/download-artifact@v4
188188
with:
189189
name: opensvm-dioxus-macos-latest-desktop
190190
path: macos-artifact
@@ -236,10 +236,10 @@ jobs:
236236
if: github.event_name == 'push'
237237
steps:
238238
- name: Checkout repository
239-
uses: actions/checkout@v3
239+
uses: actions/checkout@v4
240240

241241
- name: Set up JDK
242-
uses: actions/setup-java@v3
242+
uses: actions/setup-java@v4
243243
with:
244244
distribution: 'temurin'
245245
java-version: '17'
@@ -262,7 +262,7 @@ jobs:
262262
args: dioxus-cli --force
263263

264264
- name: Cache dependencies
265-
uses: actions/cache@v3
265+
uses: actions/cache@v4
266266
with:
267267
path: |
268268
~/.cargo/registry
@@ -283,7 +283,7 @@ jobs:
283283
$ANDROID_HOME/build-tools/33.0.0/apksigner sign --ks debug.keystore --ks-pass pass:android --key-pass pass:android --out opensvm-dioxus.apk app-release-aligned.apk
284284
285285
- name: Upload Android artifact
286-
uses: actions/upload-artifact@v3
286+
uses: actions/upload-artifact@v4
287287
with:
288288
name: opensvm-dioxus-android
289289
path: opensvm-dioxus/dist/android/opensvm-dioxus.apk

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,20 @@ The CI/CD pipeline is defined in `.github/workflows/ci.yml` and includes the fol
227227
3. **Homebrew Formula**: Updates the Homebrew formula for macOS users
228228
4. **Android Build**: Builds and optimizes the Android APK
229229

230+
### GitHub Actions Used
231+
232+
The workflow uses the following GitHub Actions:
233+
234+
- `actions/checkout@v4`: Checks out the repository
235+
- `actions/setup-java@v4`: Sets up JDK for Android builds
236+
- `actions/cache@v4`: Caches Cargo dependencies for faster builds
237+
- `actions/upload-artifact@v4`: Uploads build artifacts
238+
- `actions/download-artifact@v4`: Downloads artifacts for releases
239+
- `actions-rs/toolchain@v1`: Sets up Rust toolchain
240+
- `actions-rs/cargo@v1`: Runs Cargo commands
241+
- `softprops/action-gh-release@v1`: Creates GitHub releases
242+
- `android-actions/setup-android@v2`: Sets up Android SDK
243+
230244
### Creating a Release
231245

232246
To create a new release:

0 commit comments

Comments
 (0)