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

chore: update actions #2738

Merged
merged 4 commits into from
Mar 9, 2022
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
84 changes: 33 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PNPM
uses: pnpm/action-setup@v2.0.1
with:
version: 6.23.6
uses: pnpm/action-setup@v2.2.1

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'

- name: Install NPM Dependencies
- name: Install dependencies
run: pnpm install
env:
CI: true


- name: Status
run: git status

# Lint autofix cannot run on forks, so just skip those! See https://github.com/wearerequired/lint-action/issues/13
- name: Lint (External)
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }}
run: pnpm run lint

# Otherwise, run lint autofixer
- name: Lint
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
uses: wearerequired/lint-action@v1.10.0
uses: wearerequired/lint-action@v1.11.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -82,37 +78,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PNPM
uses: pnpm/action-setup@v2.0.1
with:
version: 6.23.6
uses: pnpm/action-setup@v2.2.1

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'

- name: Install NPM Dependencies
- name: Install dependencies
run: pnpm install
env:
CI: true

- name: Build Packages
run: pnpm run build

- name: Upload Package Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
packages/**/dist/**
packages/webapi/mod.js
packages/webapi/mod.js.map
if-no-files-found: error

# Test depends on Build's output, which allows us to skip any build process!
test:
name: 'Test: ${{ matrix.os }} (node@${{ matrix.node_version }})'
Expand All @@ -131,29 +123,25 @@ jobs:
- build
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PNPM
uses: pnpm/action-setup@v2.0.1
with:
version: 6.23.6

uses: pnpm/action-setup@v2.2.1

- name: Setup node@${{ matrix.node_version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'

- name: Download Build Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: Extract Artifacts
run: ./.github/extract-artifacts.sh

- name: Install NPM Dependencies
- name: Install dependencies
run: pnpm install
env:
CI: true

- name: Test
run: pnpm run test
Expand All @@ -176,31 +164,29 @@ jobs:
run: git submodule update --remote

- name: Setup PNPM
uses: pnpm/action-setup@v2.0.1
with:
version: 6.23.6
uses: pnpm/action-setup@v2.2.1

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'pnpm'

- name: Download Build Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: Extract Artifacts
run: ./.github/extract-artifacts.sh

- name: Install NPM Dependencies
run: pnpm install --frozen-lockfile=false
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Test
run: pnpm run test:smoke

- name: Memory Leak Test
run: |
node ./scripts/memory/mk.js
node ./scripts/memory/mk.js
node --expose-gc ./scripts/memory/index.js --ci


Expand All @@ -212,32 +198,28 @@ jobs:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup PNPM
uses: pnpm/action-setup@v2.0.1
with:
version: 6.23.6
uses: pnpm/action-setup@v2.2.1

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'

- name: Download Build Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: Extract Artifacts
run: ./.github/extract-artifacts.sh

- name: Install NPM Dependencies
- name: Install dependencies
run: pnpm install
env:
CI: true


- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code using Git
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Setup PNPM
uses: pnpm/action-setup@v2.0.1
with:
version: 6.23.6
uses: pnpm/action-setup@v2.2.1
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- name: Install NPM Dependencies
- name: Install dependencies
run: pnpm install
env:
CI: true
- name: Format code
run: pnpm run format
- name: Commit changes
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Auto Assign Issues to Project
on:
issues:
types: [opened]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -13,21 +13,21 @@ jobs:
name: Auto-assign new issues to projects
steps:
- name: Assign Bugs to the Bug Tracker
uses: srggrs/assign-one-project-github-action@1.2.1
uses: srggrs/assign-one-project-github-action@1.3.1
if: github.event.action == 'opened' && startsWith(github.event.issue.title, '🐛 BUG:')
with:
project: 'https://github.com/withastro/astro/projects/2'
column_name: 'Needs Triage'

- name: Assign RFCs to the RFC Tracker
uses: srggrs/assign-one-project-github-action@1.2.1
uses: srggrs/assign-one-project-github-action@1.3.1
if: github.event.action == 'opened' && startsWith(github.event.issue.title, '💡 RFC:')
with:
project: 'https://github.com/withastro/astro/projects/3'
column_name: 'Discussing'

- name: Assign RFCs to the Docs Tracker
uses: srggrs/assign-one-project-github-action@1.2.1
uses: srggrs/assign-one-project-github-action@1.3.1
if: github.event.action == 'opened' && startsWith(github.event.issue.title, '📘 DOC:')
with:
project: 'https://github.com/withastro/astro/projects/5'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'withastro'
steps:
- uses: actions/labeler@v3
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
24 changes: 10 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
MESSAGE: ${{ github.event.commits[0].message }}
run: |
TRIMMED=$(echo "$MESSAGE" | sed '1!d;q')
echo "::set-output name=COMMIT_MSG::${TRIMMED}"
echo "::set-output name=COMMIT_MSG::${TRIMMED}"
- name: Send a Discord notification when a PR is merged
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }}
Expand All @@ -39,30 +39,26 @@ jobs:
outputs:
run_job: ${{ steps.check_files.outputs.run_job }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup PNPM
uses: pnpm/action-setup@v2.0.1
with:
version: 6.23.6
uses: pnpm/action-setup@v2.2.1

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'

- name: Install NPM Dependencies
- name: Install dependencies
run: pnpm install
env:
CI: true


- name: Check Modified
run: pnpm exec changeset status --output ./status.json

- name: Check Output
id: check_files
run: |
run: |
output=`echo $(cat status.json)`
if [[ $output = '{ "changesets": [], "releases": [] }' ]]
then
Expand All @@ -72,14 +68,14 @@ jobs:
echo 'changes found, push to latest skipped'
echo "::set-output name=run_job::false"
fi

update:
name: Update the latest branch
needs: check_for_update
if: needs.check_for_update.outputs.run_job == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
Loading