Skip to content

Commit

Permalink
ci: Update action versions in workflow files (#15)
Browse files Browse the repository at this point in the history
* chore: Update example to tauri v1.5

* fix clippy yaaaa

* ci: Update action versions in workflow files
  • Loading branch information
FabianLars authored Oct 16, 2023
1 parent 5d7f536 commit 8f65315
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 79 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
- uses: actions/checkout@v4

- uses: rustsec/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 3 additions & 2 deletions .github/workflows/covector-status.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: covector status
on: [pull_request]
on: [ pull_request ]

jobs:
covector:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: covector status
uses: jbolda/covector/packages/action@covector-v0
with:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/covector-version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,38 @@ name: covector version or publish
on:
push:
branches:
- dev
- dev

jobs:
covector:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v2

- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: git config
run: |
git config --global user.name "${{ github.event.pusher.name }}"
git config --global user.email "${{ github.event.pusher.email }}"
- name: covector version-or-publish
uses: jbolda/covector/packages/action@covector-v0
id: covector
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: 'version-or-publish'
createRelease: true

- name: create pull request
id: cpr
uses: tauri-apps/create-pull-request@v2.8.0
uses: tauri-apps/create-pull-request@v3
with:
title: "Publish New Versions"
labels: "version updates"
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Install rustfmt with nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions/checkout@v4

- name: Install rustfmt with nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path=Cargo.toml --all -- --check

- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path=Cargo.toml --all -- --check
15 changes: 9 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: install webkit2gtk
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2

- name: Install clippy with stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: clippy
components: clippy

- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
69 changes: 16 additions & 53 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,62 +19,25 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ ubuntu-latest, macos-latest, windows-latest ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Install gtk on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: Get current date
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: Get current date
if: matrix.os == 'windows-latest'
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install gtk on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
# Add date to the cache to keep it up to date
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2

- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
# Add date to the cache to keep it up to date
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
- name: Cache cargo target
uses: actions/cache@v2
with:
path: ${{ matrix.project}}/target
# Add date to the cache to keep it up to date
key: ${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
# Restore from outdated cache for speed
restore-keys: |
${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=Cargo.toml --release
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path=Cargo.toml --release

0 comments on commit 8f65315

Please sign in to comment.