Skip to content

Commit

Permalink
🤖 format
Browse files Browse the repository at this point in the history
- update paths to local repo workflow files
- use non-screaming snake_case for regular bash variables
- update var names
- apply formatter styles
  • Loading branch information
ttytm committed Aug 13, 2023
1 parent c9638e0 commit 42e3f7d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @tobealive
* @ttytm
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: CI

on:
push:
branches: [main, "**-dev"]
paths: ["**/*.rs", "**/*.yml", "**/*.toml", "**/*.lock"]
branches: [main, '**-dev']
paths: ['**/*.rs', '**/*.yml', '**/*.toml', '**/*.lock']
pull_request:
workflow_dispatch:

Expand All @@ -12,7 +12,7 @@ env:

jobs:
Lint:
uses: tobealive/wthrr-the-weathercrab/.github/workflows/lint.yml@main
uses: ./.github/workflows/lint.yml

Test:
needs: Lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: giraffate/clippy-action@v1
with:
reporter: "github-pr-review"
reporter: 'github-pr-review'
github_token: ${{ secrets.GITHUB_TOKEN }}

actionlint:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defaults:

jobs:
lint:
uses: tobealive/wthrr-the-weathercrab/.github/workflows/lint.yml@main
uses: ./.github/workflows/lint.yml

build:
needs: lint
Expand Down Expand Up @@ -75,25 +75,25 @@ jobs:
run: |
mkdir -p ./artifacts
if [[ $RUNNER_OS == "Windows" ]]; then
EXEC=$APP_NAME.exe
bin_file=$APP_NAME.exe
else
EXEC=$APP_NAME
bin_file=$APP_NAME
fi
if [[ $GITHUB_REF_TYPE =~ ^tag$ ]]; then
TAG=$GITHUB_REF_NAME
version=$GITHUB_REF_NAME
else
TAG=$GITHUB_SHA
version=$GITHUB_SHA
fi
if [[ $RUNNER_OS == "Linux" ]]; then
mv ./wthrr-*-x86_64.AppImage "./artifacts/wthrr-$TAG-x86_64-linux.AppImage"
mv ./wthrr-*-x86_64.AppImage "./artifacts/wthrr-$version-x86_64-linux.AppImage"
fi
# beautify release targets (remove '-unknown' / '-gnu' from filename)
ARTIFACT_NAME=$APP_NAME-$TAG-$(echo "$TARGET" | sed -e 's/-unknown//' -e 's/-gnu//')
mkdir "$ARTIFACT_NAME"
cp README.md LICENSE "$ARTIFACT_NAME/"
mv "./target/$TARGET/release/$EXEC" "./$ARTIFACT_NAME/$EXEC"
artifact=$APP_NAME-$version-$(echo "$TARGET" | sed -e 's/-unknown//' -e 's/-gnu//')
mkdir "$artifact"
cp README.md LICENSE "$artifact/"
mv "./target/$TARGET/release/$bin_file" "./$artifact/$bin_file"
# compress
tar -czf "./artifacts/$ARTIFACT_NAME.tar.gz" "$ARTIFACT_NAME"
tar -czf "./artifacts/$artifact.tar.gz" "$artifact"
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tarpaulin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: tarpaulin
on:
pull_request:
paths:
- "**/*.lock"
- "**/*.rs"
- "**/*.toml"
- "**/tarpaulin.yml"
- '**/*.lock'
- '**/*.rs'
- '**/*.toml'
- '**/tarpaulin.yml'

permissions:
pull-requests: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test Results

on:
workflow_run:
workflows: ["CI"]
workflows: ['CI']
types: [completed]
permissions: {}

Expand Down Expand Up @@ -38,4 +38,4 @@ jobs:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/test-event/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "artifacts/**/*.xml"
files: 'artifacts/**/*.xml'

0 comments on commit 42e3f7d

Please sign in to comment.