From 8ea9cd82bfe5a46282f1fc5b614b7e5c9185eea6 Mon Sep 17 00:00:00 2001 From: "Dwight Spencer (denzuko@mastodon.social)" Date: Thu, 31 Oct 2024 02:37:31 -0500 Subject: [PATCH 1/2] Update package.json Signed-off-by: Dwight Spencer (denzuko@mastodon.social) --- package.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 05da2fe..a792a7a 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,12 @@ { - "name": "dapp", - "version": "1.0.0", + "name": "3umgroup-Fortuna", + "version": "1.0.1", "description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).", "main": "jest.config.js", "scripts": { "start": "react-scripts start", "preinstall": "npx npm-force-resolutions", + "prebuild": "npm test", "build": "cross-env REACT_APP_ENV=production react-scripts build", "start:prod": "REACT_APP_ENV=production react-scripts start", "eject": "react-scripts eject", @@ -13,10 +14,12 @@ "build-storybook": "storybook build", "test": "jest", "test:watch": "jest --watch", - "test:coverage": "jest --coverage" + "test:coverage": "jest --coverage", + "version": "npm run build && git add -A dist", + "postversion": "git push && git push --tags && rm -rf build/temp" }, "keywords": [], - "author": "", + "author": "3umgroup.com", "license": "ISC", "dependencies": { "@3um-group/atomic-sdk": "^1.0.32", From 8ef7c658e6ccdf48dde5200b560db9904d9ca31f Mon Sep 17 00:00:00 2001 From: "Dwight Spencer (denzuko@mastodon.social)" Date: Thu, 31 Oct 2024 02:37:56 -0500 Subject: [PATCH 2/2] Create release.yml Signed-off-by: Dwight Spencer (denzuko@mastodon.social) --- .github/workflows/release.yml | 92 +++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..90b9e6f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,92 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the semantic version releases + push: + # Sequence of patterns matched against refs/tags + tags: + - '[0-9]+.[0-9]+.[0-9]+' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +#continue-on-error: true + +jobs: + security: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Run Snyk to check for vulnerabilities + uses: snyk/actions/node@master + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + with: + command: test + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Nodejs + uses: actions/setup-node@v1 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Setup Pages + uses: actions/configure-pages@v5 + # Update version in package.json according to the tag + - name: Check package version + uses: technote-space/package-version-check-action@v1 + - name: Generate Changelog + uses: scottbrenner/generate-changelog-action@master + id: Changelog + env: + REPO: ${{ github.repository }} + - name: Create Release + id: create_release + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + ${{ steps.Changelog.outputs.changelog }} + draft: false + prerelease: false + - run: npm install + - run: npm build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './build' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4