-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
32,263 additions
and
24,610 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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 |
---|---|---|
@@ -1,39 +1,12 @@ | ||
name: CLA Assistant | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
pull_request_target: | ||
types: [opened, closed, synchronize] | ||
issue_comment: | ||
types: [created] | ||
pull_request_target: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
CLA: | ||
runs-on: ubuntu-latest | ||
# This job only runs for pull request comments or pull request target events (not issue comments) | ||
if: github.event.issue.pull_request || github.event_name == 'pull_request_target' | ||
steps: | ||
- uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73 | ||
id: sign | ||
with: | ||
text: ${{ github.event.comment.body }} | ||
regex: '\s*I have read the CLA Document and I hereby sign the CLA\s*' | ||
- uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73 | ||
id: recheck | ||
with: | ||
text: ${{ github.event.comment.body }} | ||
regex: '\s*recheck\s*' | ||
- name: CLA Assistant | ||
if: ${{ steps.recheck.outputs.match != '' || steps.sign.outputs.match != '' }} || github.event_name == 'pull_request_target' | ||
# Version: 2.1.2-beta | ||
uses: cla-assistant/github-action@948230deb0d44dd38957592f08c6bd934d96d0cf | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PERSONAL_ACCESS_TOKEN : ${{ secrets.CLA_BOTIFY_TOKEN }} | ||
with: | ||
path-to-signatures: '${{ github.repository }}/cla.json' | ||
path-to-document: 'https://github.com/${{ github.repository }}/blob/main/CLA.md' | ||
branch: 'main' | ||
remote-organization-name: 'Expensify' | ||
remote-repository-name: 'CLA' | ||
lock-pullrequest-aftermerge: false | ||
allowlist: 'snyk-bot,OSBotify' | ||
CLA: | ||
uses: Expensify/GitHub-Actions/.github/workflows/cla.yml@main | ||
secrets: inherit |
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
name: Lint JavaScript | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.yarn | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "16.x" | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '16.x' | ||
|
||
- name: Install node_modules | ||
run: yarn install --immutable | ||
- name: Install node_modules | ||
run: npm ci | ||
|
||
- name: Verify there's no Prettier diff | ||
run: | | ||
yarn lint --fix --quiet | ||
if ! git diff --name-only --exit-code; then | ||
# shellcheck disable=SC2016 | ||
echo 'Error: Prettier diff detected! Please run `yarn lint --fix` and commit the changes.' | ||
exit 1 | ||
fi | ||
- name: Verify there's no Prettier diff | ||
run: | | ||
npm run lint -- --fix --quiet | ||
if ! git diff --name-only --exit-code; then | ||
# shellcheck disable=SC2016 | ||
echo 'Error: Prettier diff detected! Please run `npm run lint -- --fix` and commit the changes.' | ||
exit 1 | ||
fi |
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 |
---|---|---|
@@ -1,71 +1,18 @@ | ||
name: Publish package to npmjs | ||
|
||
# This workflow runs when code is pushed to `main` (i.e: when a pull request is merged) | ||
on: | ||
push: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
# Ensure that only once instance of this workflow executes at a time. | ||
# Ensure that only one instance of this workflow executes at a time. | ||
# If multiple PRs are merged in quick succession, there will only ever be one publish workflow running and one pending. | ||
concurrency: ${{ github.workflow }} | ||
|
||
jobs: | ||
version: | ||
runs-on: ubuntu-latest | ||
|
||
# OSBotify will update the version on `main`, so this check is important to prevent an infinite loop | ||
if: ${{ github.actor != 'OSBotify' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
# The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify | ||
# This is a workaround to allow pushes to a protected branch | ||
token: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }} | ||
|
||
- name: Decrypt & Import OSBotify GPG key | ||
run: | | ||
cd .github | ||
gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" --output OSBotify-private-key.asc OSBotify-private-key.asc.gpg | ||
gpg --import OSBotify-private-key.asc | ||
env: | ||
LARGE_SECRET_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} | ||
|
||
- name: Set up git for OSBotify | ||
run: | | ||
git config --global user.signingkey AEE1036472A782AB | ||
git config --global commit.gpgsign true | ||
git config --global user.name OSBotify | ||
git config --global user.email [email protected] | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install yarn packages | ||
run: yarn install --immutable | ||
|
||
- name: Update npm version | ||
run: yarn version patch | ||
|
||
- name: Set new version in GitHub ENV | ||
run: echo "NEW_VERSION=$(jq '.version' package.json)" >> $GITHUB_ENV | ||
|
||
- name: Commit version bump | ||
run: git commit -am "Bump version to ${{ env.NEW_VERSION }}" | ||
|
||
- name: Tag version bump | ||
run: git tag ${{ env.NEW_VERSION }} | ||
|
||
- name: Push branch and publish tags | ||
run: git push --set-upstream origin main && git push --tags | ||
|
||
- name: Build package | ||
run: yarn pack | ||
|
||
- name: Publish to npm | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
publish: | ||
# os-botify[bot] will update the version on `main`, so this check is important to prevent an infinite loop | ||
if: ${{ github.actor != 'os-botify[bot]' }} | ||
uses: Expensify/GitHub-Actions/.github/workflows/npmPublish.yml@main | ||
secrets: inherit | ||
with: | ||
should_run_pack: true |
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
Oops, something went wrong.