Update dependency @typescript-eslint/parser to v8 #125
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: "Pull Request" | |
on: | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: "Install" | |
run: | | |
npm install | |
- name: "Prettier" | |
run: | | |
npm run format-check | |
- name: "Lint" | |
run: | | |
npm run lint | |
- name: "Test" | |
run: | | |
npm run test | |
- name: "build" | |
run: | | |
npm run build | |
npm run package | |
test: | |
runs-on: ubuntu-24.04 | |
env: | |
EMAIL_INPUT: test@example.com | |
USERNAME_INPUT: example-test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: "Build action for test" | |
run: | | |
npm install | |
npm run build | |
npm run package | |
git clean -fXd | |
- uses: webiny/action-post-run@3.1.0 | |
with: | |
run: .github/scripts/test_post.sh | |
- name: Test executing the action | |
uses: ./ | |
env: | |
GIT_DEPLOY_KEY: not-a-real-key | |
AUTH_TOKEN_STRING: | | |
email = devops@smartly.io | |
with: | |
email: ${{ env.EMAIL_INPUT }} | |
username: ${{ env.USERNAME_INPUT }} | |
- run: | | |
set -u | |
cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa" | |
echo | |
git config user.name | |
git config user.email | |
git remote get-url origin | |
git config core.sshCommand | |
grep '^github\.com' "$RUNNER_TEMP/setup-npm-publish-action/known_hosts" | |
[[ "$(cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa")" == "not-a-real-key" ]] | |
[[ "$(git config user.name)" == "${{ env.USERNAME_INPUT }}" ]] | |
[[ "$(git config user.email)" == "${{ env.EMAIL_INPUT }}" ]] | |
[[ "$(git remote get-url origin)" == "git@github.com:$GITHUB_REPOSITORY.git" ]] | |
# Just check that it is altered from default | |
[[ "$(git config core.sshCommand)" == *UserKnownHostsFile* ]] | |
test-cleanup-non-repo: | |
runs-on: ubuntu-24.04 | |
env: | |
EMAIL_INPUT: test@example.com | |
USERNAME_INPUT: example-test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: "Build action for test" | |
run: | | |
npm install | |
npm run build | |
npm run package | |
git clean -fXd | |
- uses: webiny/action-post-run@3.1.0 | |
with: | |
run: .github/scripts/test_missing_npmrc_post.sh | |
- name: Test executing the action | |
uses: ./ | |
env: | |
GIT_DEPLOY_KEY: not-a-real-key | |
AUTH_TOKEN_STRING: | | |
email = devops@smartly.io | |
with: | |
email: ${{ env.EMAIL_INPUT }} | |
username: ${{ env.USERNAME_INPUT }} | |
- run: | | |
set -u | |
cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa" | |
echo | |
git config user.name | |
git config user.email | |
git remote get-url origin | |
git config core.sshCommand | |
grep '^github\.com' "$RUNNER_TEMP/setup-npm-publish-action/known_hosts" | |
[[ "$(cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa")" == "not-a-real-key" ]] | |
[[ "$(git config user.name)" == "${{ env.USERNAME_INPUT }}" ]] | |
[[ "$(git config user.email)" == "${{ env.EMAIL_INPUT }}" ]] | |
[[ "$(git remote get-url origin)" == "git@github.com:$GITHUB_REPOSITORY.git" ]] | |
# Just check that it is altered from default | |
[[ "$(git config core.sshCommand)" == *UserKnownHostsFile* ]] | |
- run: rm -rf .git | |
test-missing-npmrc: | |
runs-on: ubuntu-24.04 | |
env: | |
EMAIL_INPUT: test@example.com | |
USERNAME_INPUT: example-test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: "Build action for test" | |
run: | | |
npm install | |
npm run build | |
npm run package | |
git clean -fXd | |
- run: | | |
git config --global user.email "fake@fake.com" | |
git config --global user.name "Testing" | |
git rm .npmrc | |
git commit -m "mark removed npmrc file" | |
- uses: webiny/action-post-run@3.1.0 | |
with: | |
run: .github/scripts/test_missing_npmrc_post.sh | |
- name: Test executing the action | |
uses: ./ | |
env: | |
GIT_DEPLOY_KEY: not-a-real-key | |
AUTH_TOKEN_STRING: | | |
email = devops@smartly.io | |
with: | |
email: ${{ env.EMAIL_INPUT }} | |
username: ${{ env.USERNAME_INPUT }} | |
- run: | | |
set -u | |
cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa" | |
echo | |
git config user.name | |
git config user.email | |
git remote get-url origin | |
git config core.sshCommand | |
grep '^github\.com' "$RUNNER_TEMP/setup-npm-publish-action/known_hosts" | |
[[ "$(cat "$RUNNER_TEMP/setup-npm-publish-action/id_rsa")" == "not-a-real-key" ]] | |
[[ "$(git config user.name)" == "${{ env.USERNAME_INPUT }}" ]] | |
[[ "$(git config user.email)" == "${{ env.EMAIL_INPUT }}" ]] | |
[[ "$(git remote get-url origin)" == "git@github.com:$GITHUB_REPOSITORY.git" ]] | |
# Just check that it is altered from default | |
[[ "$(git config core.sshCommand)" == *UserKnownHostsFile* ]] | |
release: | |
runs-on: ubuntu-24.04 | |
name: "Build and release action" | |
needs: [build, test, test-cleanup-non-repo, test-missing-npmrc] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: true | |
- name: Configure git | |
uses: smartlyio/github-actions@git-init-userinfo-v1 | |
- name: Release flow | |
uses: smartlyio/github-actions@release-action-node-v1 | |
with: | |
dry_run: true | |
token: "${{ secrets.GITHUB_TOKEN }}" |