-
Notifications
You must be signed in to change notification settings - Fork 907
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate all Actions workflows to the
maintenance/v1.x
branch (…
- Loading branch information
1 parent
ae15920
commit de972e4
Showing
10 changed files
with
310 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: Report a Bug | ||
about: Help us reproduce a bug you've found so that we can fix it | ||
title: '' | ||
labels: ['bug'] | ||
assignees: '' | ||
--- | ||
|
||
<!-- Please fill in each section completely. Thank you! --> | ||
|
||
## Overview | ||
|
||
<!-- Say a few words about how you came to discover this bug --> | ||
|
||
## Steps to reproduce | ||
|
||
<!-- | ||
List the steps that someone unfamiliar with your problem would | ||
have to take to observe this bug. | ||
Ideally, include a code snippet or link to a repository that | ||
someone can run locally to reproduce the problem. | ||
--> | ||
|
||
## Description of bug | ||
|
||
<!-- | ||
Describe what happened that you did not expect, or what did not | ||
happen the way you had hoped. | ||
Include the full text of error messages and logs, if any. | ||
Do not upload screenshots of error messages. | ||
--> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Suggest a Feature | ||
about: Propose an idea for how to make this library better. | ||
title: '' | ||
labels: ['enhancement'] | ||
assignees: '' | ||
--- | ||
|
||
<!-- Please fill in each section completely. Thank you! --> | ||
|
||
## Motivation | ||
|
||
<!-- | ||
Say a few words about what motivated you to propose this enhancement. | ||
--> | ||
|
||
## Example use case | ||
|
||
<!-- | ||
Demonstrate how someone might use this new feature. | ||
If applicable, write code or pseudocode that would produce the | ||
desired result if this feature existed. | ||
--> | ||
|
||
## Details | ||
|
||
<!-- | ||
Go into detail about how this new feature must behave. If you have | ||
ideas on how to implement it, go into them here. | ||
--> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
contact_links: | ||
- about: 'Have a question about using this software, or about Solana in general? Post it on the Solana Stack Exchange.' | ||
name: Ask a Question | ||
url: 'https://solana.stackexchange.com/questions/ask' | ||
- about: 'Start or join a discussion on the Solana Tech Discord.' | ||
name: Start a Discussion | ||
url: 'https://solana.com/discord' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#### Problem | ||
|
||
#### Summary of Changes | ||
|
||
Fixes # |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'Lock inactive threads' | ||
|
||
on: | ||
# Chosen to be just before London wakes up and way past San Francisco's bedtime. | ||
schedule: | ||
- cron: '0 8 * * 1-5' # This is in UTC. | ||
workflow_dispatch: | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: lock | ||
|
||
jobs: | ||
action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dessant/lock-threads@v4 | ||
with: | ||
github-token: ${{ github.token }} | ||
issue-inactive-days: '7' | ||
issue-lock-reason: 'resolved' | ||
issue-comment: > | ||
Because there has been no activity on this issue for 7 days since it was closed, it has | ||
been automatically locked. Please open a new issue if it requires a follow up. | ||
pr-inactive-days: '14' | ||
pr-lock-reason: 'resolved' | ||
pr-comment: > | ||
Because there has been no activity on this PR for 14 days since it was merged, it has | ||
been automatically locked. Please open a new issue if it requires a follow up. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: 'Issue Label Actions' | ||
|
||
on: | ||
issues: | ||
types: [labeled, unlabeled] | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
|
||
jobs: | ||
action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dessant/label-actions@v2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: 'Manage stale issues and PRs' | ||
on: | ||
# Chosen to be just before London wakes up and way past San Francisco's bedtime. | ||
schedule: | ||
- cron: '0 8 * * 1-5' # This is in UTC. | ||
# Do a dry-run (debug-only: true) whenever this workflow itself is changed. | ||
pull_request: | ||
paths: | ||
- .github/workflows/manage-stale-threads.yml | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v6 | ||
with: | ||
ascending: true # Spend API operations budget on older, more-likely-to-get-closed issues first | ||
close-issue-message: '' # Leave no comment when closing | ||
close-pr-message: '' # Leave no comment when closing | ||
days-before-issue-stale: 365 | ||
days-before-pr-stale: 14 | ||
days-before-close: 7 | ||
debug-only: ${{ github.event_name == 'pull_request' }} # Dry-run when true. | ||
exempt-all-milestones: true # Milestones can sometimes last a month, so exempt issues attached to a milestone. | ||
exempt-issue-labels: blocked,do-not-close,feature-gate,security | ||
exempt-pr-labels: blocked,do-not-close,feature-gate,security | ||
# No actual changes get made in debug-only mode, so we can raise the operations ceiling. | ||
operations-per-run: ${{ github.event_name == 'pull_request' && 1000 || 900}} | ||
stale-issue-label: stale | ||
stale-issue-message: '' # Leave no comment when marking as stale | ||
stale-pr-label: stale | ||
stale-pr-message: '' # Leave no comment when marking as stale |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Preview GitHub Pages | ||
|
||
on: | ||
pull_request: | ||
types: [synchronize, opened, reopened] | ||
|
||
env: | ||
# Among other things, opts out of Turborepo telemetry | ||
# See https://consoledonottrack.com/ | ||
DO_NOT_TRACK: '1' | ||
# Some tasks slow down considerably on GitHub Actions runners when concurrency is high | ||
TURBO_CONCURRENCY: 1 | ||
# Enables Turborepo Remote Caching. | ||
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | ||
|
||
jobs: | ||
compile-gh-pages: | ||
runs-on: ubuntu-latest | ||
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: maintenance/v1.x | ||
|
||
- name: Install Dependencies | ||
uses: ./.github/workflows/actions/install-dependencies | ||
|
||
- name: Compile and Upload Artifacts | ||
uses: ./.github/workflows/actions/compile-gh-pages | ||
|
||
preview: | ||
runs-on: ubuntu-latest | ||
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' | ||
needs: [compile-gh-pages] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Dependencies | ||
uses: ./.github/workflows/actions/install-dependencies | ||
|
||
- name: Download Deploy Directory from Artifact Cache | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: .ghpages-deploy | ||
pattern: ghpages-deploy-artifacts* | ||
merge-multiple: true | ||
|
||
- name: Deploy to Preview Github Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
destination_dir: ${{ format('{0}/', github.event.pull_request.number) }} | ||
external_repository: solana-labs/solana-web3.js-pr-preview | ||
personal_token: ${{ secrets.PR_PREVIEW_REPO_CONTENTS_TOKEN }} | ||
publish_dir: .ghpages-deploy | ||
|
||
- name: Find Existing Preview Link Comment | ||
uses: peter-evans/find-comment@v3 | ||
id: find-comment | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'github-actions[bot]' | ||
body-includes: <!-- GH_PAGES_PREVIEW_BOT_COMMENT --> | ||
|
||
- name: Create Preview Link Comment | ||
uses: actions/github-script@v7 | ||
if: steps.find-comment.outputs.comment-id == '' | ||
with: | ||
script: > | ||
const prNumber = context.issue.number; | ||
github.rest.issues.createComment({ | ||
issue_number: prNumber, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: [ | ||
'<!-- GH_PAGES_PREVIEW_BOT_COMMENT -->', | ||
'A preview of the GitHub Pages site based on this PR is now available here:', | ||
'', | ||
`<a href="https://solana-labs.github.io/solana-web3.js-pr-preview/${prNumber}/" rel="noopener noreferrer" target="_blank">solana-labs.github.io/solana-web3.js-pr-preview/${prNumber}/</a>`, | ||
].join('\n'), | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Publish GitHub Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
branches: | ||
- maintenance/* | ||
push: | ||
branches: | ||
- maintenance/* | ||
|
||
env: | ||
# Among other things, opts out of Turborepo telemetry | ||
# See https://consoledonottrack.com/ | ||
DO_NOT_TRACK: '1' | ||
# Some tasks slow down considerably on GitHub Actions runners when concurrency is high | ||
TURBO_CONCURRENCY: 1 | ||
# Enables Turborepo Remote Caching. | ||
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | ||
|
||
jobs: | ||
compile-gh-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: maintenance/v1.x | ||
|
||
- name: Install Dependencies | ||
uses: ./.github/workflows/actions/install-dependencies | ||
|
||
- name: Compile and Upload Artifacts | ||
uses: ./.github/workflows/actions/compile-gh-pages | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: [compile-gh-pages] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Dependencies | ||
uses: ./.github/workflows/actions/install-dependencies | ||
|
||
- name: Download Deploy Directory from Artifact Cache | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: .ghpages-deploy | ||
pattern: ghpages-deploy-artifacts* | ||
merge-multiple: true | ||
|
||
- name: Deploy to Github Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: .ghpages-deploy |