Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync repo v1.20.0 #349

Merged
merged 1 commit into from Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -12,11 +12,11 @@ jobs:
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
name: Install pnpm
id: pnpm-install
with:
Expand All @@ -29,7 +29,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
Expand Down
50 changes: 22 additions & 28 deletions .github/workflows/release-please.yml
Expand Up @@ -10,88 +10,82 @@ jobs:
steps:
# Create release
- name: Create release
uses: google-github-actions/release-please-action@v3
uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
package-name: release-please-action
## branch to open pull release PR against (detected by default)
default-branch: main
## Should breaking changes before 1.0.0 produce minor bumps? Default false
# bump-minor-pre-major: true
## Should feat changes before 1.0.0 produce patch bumps instead of minor bumps? Default false
# bump-patch-for-minor-pre-major: true
## If set, create releases that are pre-major or pre-release version marked as pre-release on GitHub. Defaults false
prerelease: false
## header used within the release PR body, defaults to using :robot: I have created a release *beep* *boop*
pull-request-header: ':robot: A new release will be created'
## A JSON formatted String containing to override the outputted changelog sections
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"refactor","section":"Code Refactoring","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"perf","section":"Performance Improvements","hidden":false}]'
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `GH_TOKEN` (this secret name is not important).
token: ${{ secrets.GH_TOKEN }}
# optional. customize path to release-please-config.json
config-file: release-please-config.json
# optional. customize path to .release-please-manifest.json
manifest-file: .release-please-manifest.json

# Checkout
- name: Checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}

# Install Node.js
- name: Install Node.js
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}

# Install pnpm
- name: Install pnpm
if: ${{ steps.release.outputs.release_created }}
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
id: pnpm-install
with:
version: 8
run_install: false
if: ${{ steps.release.outputs.release_created }}

# Get pnpm store directory
- name: Get pnpm store directory
if: ${{ steps.release.outputs.release_created }}
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
if: ${{ steps.release.outputs.release_created }}

# Setup pnpm cache
- name: Setup pnpm cache
if: ${{ steps.release.outputs.release_created }}
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
if: ${{ steps.release.outputs.release_created }}

# Install dependencies
- name: Install dependencies
if: ${{ steps.release.outputs.release_created }}
run: pnpm install
if: ${{ steps.release.outputs.release_created }}

# Prepare new version
# https://github.com/google-github-actions/release-please-action#outputs
- name: Prepare new version
if: ${{ steps.release.outputs.release_created }}
run: |
pnpm prepareRelease
if: ${{ steps.release.outputs.release_created }}

# Build for production and Archive package
- name: Build for production
if: ${{ steps.release.outputs.release_created }}
run: pnpm package
if: ${{ steps.release.outputs.release_created }}

# Upload package to release
# https://github.com/philips-labs/terraform-aws-github-runner/blob/main/.github/workflows/release.yml#L46
- name: Upload package.zip to the release
if: ${{ steps.release.outputs.releases_created }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
for f in $(find ./build -name '*.zip'); do
gh release upload ${{ steps.release.outputs.tag_name }} $f
done
done
if: ${{ steps.release.outputs.releases_created }}
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -23,6 +23,7 @@ venv
__pycache__
cookie.txt
token.txt
pageId.txt

# ext
extension
Expand All @@ -32,6 +33,10 @@ build
widget
archive.zip
components.d.ts
auto-imports.d.ts

# ginx
nginx

# test
coverage
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
@@ -0,0 +1,3 @@
{
".": "1.20.0"
}