Bump babel-loader from 9.1.3 to 9.2.1 #1130
Workflow file for this run
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: CI/CD | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
testbuild: | |
name: Test and Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Unit Tests | |
run: npm run test:ci | |
- name: Run Linter | |
run: npm run lint | |
- name: Run Build | |
run: npm run build | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run E2E Tests | |
run: npm run test:e2e | |
- name: Upload E2E Test Results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Upload Build artifact | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: dist | |
path: dist | |
retention-days: 30 | |
deploystage: | |
name: Deploy to Staging | |
runs-on: ubuntu-latest | |
environment: | |
name: staging | |
url: https://dndbattletracker.com/stage/ | |
concurrency: | |
group: staging | |
cancel-in-progress: true | |
needs: testbuild | |
if: github.event_name == 'push' | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Download Build artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
with: | |
role-to-assume: arn:aws:iam::341118543232:role/github-s3-access | |
aws-region: eu-west-2 | |
- name: Deploy to Staging | |
run: aws s3 sync . s3://dndbattletracker.com/stage/ | |
deployprodpreflight: | |
name: Deploy to Production Preflight Checks | |
runs-on: ubuntu-latest | |
needs: deploystage | |
if: github.event_name == 'push' | |
outputs: | |
versionchanged: ${{ steps.versioncheck.outputs.changed }} | |
version: ${{ steps.versioncheck.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check if version has been updated | |
id: versioncheck | |
uses: EndBug/version-check@v2 | |
with: | |
diff-search: true | |
deployprod: | |
name: Deploy to Production | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://dndbattletracker.com/ | |
concurrency: | |
group: production | |
cancel-in-progress: true | |
needs: deployprodpreflight | |
if: github.event_name == 'push' && needs.deployprodpreflight.outputs.versionchanged == 'true' | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Download Build artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
with: | |
role-to-assume: arn:aws:iam::341118543232:role/github-s3-access-production | |
aws-region: eu-west-2 | |
- name: Deploy to Production | |
run: aws s3 sync . s3://dndbattletracker.com/ | |
githubrelease: | |
name: Github Release | |
runs-on: ubuntu-latest | |
needs: [deployprodpreflight, deployprod] | |
if: github.event_name == 'push' | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Download Build artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
- name: Create release artifact | |
uses: vimtor/[email protected] | |
with: | |
files: ./ | |
recursive: true | |
dest: dnd-battle-tracker.zip | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
commit: ${{ github.sha }} | |
makeLatest: true | |
body: ${{ github.event.head_commit.message }} | |
tag: "v${{ needs.deployprodpreflight.outputs.version }}" | |
artifacts: "dnd-battle-tracker.zip" |