Skip to content

Commit

Permalink
Merge pull request #118 from rocketclimb/release-v0.3
Browse files Browse the repository at this point in the history
Release v0.3
  • Loading branch information
amorimjj authored May 17, 2024
2 parents 9eac6cf + 339fa2b commit 49f77a2
Show file tree
Hide file tree
Showing 216 changed files with 5,276 additions and 6,090 deletions.
118 changes: 118 additions & 0 deletions .github/workflows/prepare-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Prepare Preview

on:
workflow_dispatch:

env:
NODE_VERSION: "18.x"

permissions: write-all

jobs:
prepare-artifacts:
name: Prepare Artifacts
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_APP_URL: ${{ vars.NEXT_PUBLIC_APP_URL }}
PRE_RELEASE_TAG: ${{ vars.PRE_RELEASE_TAG }}
AUTOMATION_USER_NAME: ${{ vars.AUTOMATION_USER_NAME }}
AUTOMATION_USER_EMAIL: ${{ vars.AUTOMATION_USER_EMAIL }}
SKIP_IGNITION_BUILD: true

outputs:
dependency-hash: ${{ steps.extract-dependencies.outputs.DEPENDENCY_HASH }}
rocketicons-tgz: ${{ steps.generated-pkg-name.outputs.PKG_FILE }}
rocketicons-artifact-id: ${{ steps.branch-to-url.outputs.URL_ID }}-artifacts
vercel-url-alias: ${{ steps.branch-to-url.outputs.URL_ID }}${{ vars.VERCEL_ALIAS_DOMAIN }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Extract Dependencies
id: extract-dependencies
run: echo "DEPENDENCY_HASH=$(npx --yes @rocketclimb/sh extract-dependencies)" >> $GITHUB_OUTPUT

- name: Cache node_modules
uses: actions/cache@v4
id: npm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-node-${{ steps.extract-dependencies.outputs.DEPENDENCY_HASH }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache icons
uses: actions/cache@v4
id: icons-cache
with:
path: |
packages/generator/icons
key: ${{ runner.os }}-icons-${{ hashFiles('packages/generator/src/definitions.ts') }}
restore-keys: |
${{ runner.os }}-icons-
- name: Install packages
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm install --ignore-scripts

- name: Icons Fetch
if: steps.icons-cache.outputs.cache-hit != 'true'
run: npm run fetch --workspace=packages/generator

- name: Build All
run: npm run build-all

- name: Run tests
run: npm run test-all

- name: Build Ignition statics
run: npm run generate-statics:all-icons --workspace=packages/ignition

- name: Setup git user
run: |
git config user.name ${{ env.AUTOMATION_USER_NAME }}
git config user.email ${{ env.AUTOMATION_USER_EMAIL }}
- name: Branch Name to Url
id: branch-to-url
run: |
echo "URL_ID=$(echo "${{ github.ref }}" | tr -s ' ' | tr '[:upper:]' '[:lower:]' | sed 's,[ /\.],-,g' | sed 's/--/-/g')" >> $GITHUB_OUTPUT
- name: Get genereated package name
id: generated-pkg-name
run: echo "PKG_FILE=$(ls -1 -t *.tgz | head -1)" >> $GITHUB_OUTPUT

- name: Upload rocketicons tgz as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.branch-to-url.outputs.URL_ID }}-artifacts
path: ${{ steps.generated-pkg-name.outputs.PKG_FILE }}

- name: Upload data-helpers
uses: actions/upload-artifact@v4
with:
name: data-helpers
path: packages/ignition/src/app/data-helpers

publish-ignition:
needs: prepare-artifacts
uses: ./.github/workflows/publish-ignition.yml
with:
dependencies-hash: ${{ needs.prepare-artifacts.outputs.dependency-hash }}
rocketicons-tgz: ${{ needs.prepare-artifacts.outputs.rocketicons-tgz }}
rocketicons-artifact-id: ${{ needs.prepare-artifacts.outputs.rocketicons-artifact-id }}
vercel-url-alias: ${{ needs.prepare-artifacts.outputs.vercel-url-alias }}
branch: ${{ github.ref }}
env: "preview"
secrets:
token: ${{ secrets.VERCEL_TOKEN }}
14 changes: 11 additions & 3 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ jobs:
- name: Install packages
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm install --ignore-scripts
run: |
npm config set @rocketclimb:registry https://npm.pkg.github.com
npm config set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
npm install --ignore-scripts
- name: Icons Fetch
if: steps.icons-cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -98,7 +101,7 @@ jobs:
- name: Branch Name to Url
id: branch-to-url
run: |
echo "URL_ID=$(echo "${{ github.head_ref }}" | tr -s ' ' | tr '[:upper:]' '[:lower:]' | sed 's,[ /],-,g')" >> $GITHUB_OUTPUT
echo "URL_ID=$(echo "${{ github.head_ref }}" | tr -s ' ' | tr '[:upper:]' '[:lower:]' | sed 's,[ /\.],-,g' | sed 's/--/-/g')" >> $GITHUB_OUTPUT
- name: Get genereated package name
id: generated-pkg-name
Expand Down Expand Up @@ -130,11 +133,16 @@ jobs:
name: rocketicons-pkg
path: ${{ steps.generated-pkg-name.outputs.PKG_FILE }}

- name: "Tar data-helpers"
working-directory: ./packages
run: tar -cvf data-helpers.tar ignition/src/app/data-helpers

- name: Upload data-helpers
uses: actions/upload-artifact@v4
with:
name: data-helpers
path: packages/ignition/src/app/data-helpers
path: packages/data-helpers.tar
compression-level: 9

publish-ignition:
needs: prepare-artifacts
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/publish-ignition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,17 @@ jobs:
uses: actions/download-artifact@v4
with:
name: data-helpers
path: ignition/src/app/data-helpers
run-id: ${{ inputs.run-id }}
github-token: ${{ github.token }}

- name: "Untar data-helpers"
run: tar -xvf data-helpers.tar

- name: Setup npm register
run: |
npm config set @rocketclimb:registry https://npm.pkg.github.com
npm config set //npm.pkg.github.com/:_authToken ${{ github.token }}
- name: Install packages from tgz
if: ${{ inputs.rocketicons-tgz != '' }}
working-directory: ./ignition
Expand Down Expand Up @@ -159,14 +166,16 @@ jobs:
working-directory: ./ignition
run: npx vercel deploy --prebuilt --archive=tgz --prod --token=${{ secrets.token }}

- uses: actions/github-script@v7
- name: Comment on PR
if: ${{ env.NEXT_PUBLIC_VERCEL_ENV != 'production' }}
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `**The deployment is available on Vercel**. Visit on [Vercel](${{ env.NEXT_PUBLIC_APP_URL }}/)
body: `**The deployment is available on [Vercel](${{ env.NEXT_PUBLIC_APP_URL }}/)**.
Deployment details:
- ${{ env.NEXT_PUBLIC_APP_URL }}/`
Expand Down
12 changes: 6 additions & 6 deletions .versions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"rocketclimb-icons": "0.2.5",
"core": "0.2.2",
"generator": "0.2.2",
"icons": "0.2.3-alpha",
"ignition": "0.2.3",
"rocketclimb-icons": "0.3.0",
"core": "0.2.3",
"generator": "0.2.3",
"icons": "0.2.4-alpha",
"ignition": "0.3.0",
"tailwind": "0.2.1",
"hash": "134a6d040895dfab47947aa08d3a1a4d"
"hash": "bac5c2b255e3e6ad9ecb874e2c393415"
}
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
## [0.2.5](https://github.com/rocketclimb/rocketicons/compare/v0.2.3-release...v0.2.4) (2024-05-09)
## [0.3.0](https://github.com/rocketclimb/rocketicons/compare/v0.2.4-release...v0.3.0) (2024-05-17)

### Features

- basic playground [[ignition](./packages/ignition/CHANGELOG.md)] ([97c108e0](https://github.com/rocketclimb/rocketicons/commit/97c108e0c4375e2f67de20ee1b7959c8f852a472))

### Bug Fixes

- **icons** remove duplicated com prefix information ([04580f8](https://github.com/rocketclimb/rocketicons/commit/04580f8ad9d7d43b8f91e769bc809c0a53e403e9))
- google index improvements [[generator](./packages/generator/CHANGELOG.md), [ignition](./packages/ignition/CHANGELOG.md)] ([6921061](https://github.com/rocketclimb/rocketicons/commit/69210612e21756df8b79cda09b154b9878da4302))
- seo improvements [[ignition](./packages/ignition/CHANGELOG.md)] ([78c70062](https://github.com/rocketclimb/rocketicons/commit/78c700629608fd81c707f4dffcf5251fb219ac15))
- layout issues on mobile and small screens [[ignition](./packages/ignition/CHANGELOG.md)] ([d3d05ed3](https://github.com/rocketclimb/rocketicons/commit/d3d05ed32d5114a1290ad51d19c4b1be0fbc96fe))

## [0.2.5](https://github.com/rocketclimb/rocketicons/compare/v0.2.3-release...v0.2.4) (2024-05-09)

Expand Down
Loading

0 comments on commit 49f77a2

Please sign in to comment.