Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: improve workflows #697

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-test
name: Build and Test

on:
push:
Expand All @@ -16,12 +16,13 @@ jobs:
build:
runs-on: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
cache: 'gradle'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

Expand Down Expand Up @@ -50,7 +51,7 @@ jobs:
os: [ ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: temurin
Expand Down Expand Up @@ -85,10 +86,10 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand Down Expand Up @@ -123,7 +124,7 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
Expand All @@ -137,7 +138,7 @@ jobs:
mkdir dist
mv build/libs/crowdin-cli-*.jar dist/crowdin-cli.jar

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Bump version
name: Bump Version

on:
workflow_dispatch:
Expand All @@ -7,12 +7,12 @@ jobs:
version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CodeQL"
name: CodeQL Analysis

on:
schedule:
Expand All @@ -13,9 +13,8 @@ jobs:
actions: read
contents: read
security-events: write

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand All @@ -33,15 +32,15 @@ jobs:
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest

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

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
cache: 'gradle'

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Documentation release
name: Documentation Release

on:
release:
Expand All @@ -9,10 +9,10 @@ jobs:
build_and_deploy_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: lint-pr-title
name: Lint PR Title

on:
pull_request_target:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
outputs:
checksum: ${{ steps.shasum.outputs.hash }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -50,6 +50,7 @@ jobs:

- name: Upload asset
uses: softprops/action-gh-release@v1
if: github.event_name == 'release'
with:
files: |
crowdin-cli.zip
Expand All @@ -64,7 +65,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
Expand All @@ -83,7 +84,7 @@ jobs:
mkdir dist
mv build/libs/crowdin-cli-*.jar dist/crowdin-cli.jar

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18

Expand All @@ -110,7 +111,8 @@ jobs:
runs-on: ubuntu-latest
needs: assets
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
Expand All @@ -126,7 +128,8 @@ jobs:
runs-on: ubuntu-latest
needs: assets
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Invoke workflow in the homebrew-crowdin repo
uses: benc-uk/workflow-dispatch@v1
with:
Expand All @@ -140,7 +143,7 @@ jobs:
runs-on: windows-latest
needs: assets
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Update checksum
run: |
Expand All @@ -162,7 +165,7 @@ jobs:
runs-on: ubuntu-latest
needs: assets
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Copy Dockerfile
run: |
Expand Down
2 changes: 1 addition & 1 deletion website/docs/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Crowdin CLI
run: npm i -g @crowdin/cli
Expand Down