Update actions/upload-artifact action to v3.1.3 #2711
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ASF-WebConfigGenerator-ci | |
on: [push, pull_request] | |
env: | |
NODE_JS_VERSION: 'lts/*' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
show-progress: false | |
token: ${{ secrets.ARCHIBOT_GITHUB_TOKEN }} | |
- name: Setup Node.js with npm | |
uses: actions/[email protected] | |
with: | |
check-latest: true | |
node-version: ${{ env.NODE_JS_VERSION }} | |
- name: Verify Node.js | |
run: node -v | |
- name: Verify npm | |
run: npm -v | |
- name: Install npm modules for ASF-WebConfigGenerator | |
run: npm ci --no-progress | |
- name: Build ASF-WebConfigGenerator | |
run: npm run-script build --no-progress | |
- name: Upload latest strings for translation on Crowdin | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && startsWith(matrix.os, 'ubuntu-') }} | |
uses: crowdin/[email protected] | |
with: | |
crowdin_branch_name: main | |
config: '.github/crowdin.yml' | |
project_id: ${{ secrets.ASF_CROWDIN_PROJECT_ID }} | |
token: ${{ secrets.ASF_CROWDIN_API_TOKEN }} | |
- name: Upload ASF-WebConfigGenerator | |
uses: actions/[email protected] | |
with: | |
name: ${{ matrix.os }}_ASF-WebConfigGenerator | |
path: docs | |
- name: Import GPG key | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && startsWith(matrix.os, 'ubuntu-') }} | |
uses: crazy-max/ghaction-import-gpg@d6f3f49f3345e29369fe57596a3ca8f94c4d2ca7 # v5.4.0 | |
with: | |
gpg_private_key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Deploy ASF-WebConfigGenerator | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && startsWith(matrix.os, 'ubuntu-') }} | |
shell: sh | |
run: | | |
set -eu | |
git add -A "docs" | |
if ! git diff --cached --quiet; then | |
git commit -m "Automatic ASF-WebConfigGenerator deployment" | |
fi | |
- name: Push changes | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && startsWith(matrix.os, 'ubuntu-') }} | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |