-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add release scripts and pyright
- Loading branch information
Showing
16 changed files
with
860 additions
and
78 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"bumpVersionsWithWorkspaceProtocolOnly": true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: 'CI setup' | ||
description: 'Setup CI environment' | ||
|
||
inputs: | ||
node-version: | ||
description: 'Node version' | ||
required: false | ||
default: '16.20.x' | ||
python-version: | ||
description: 'Python version' | ||
required: false | ||
default: '3.8.x' | ||
job-name: | ||
description: 'Job name. Used to cache Nx results' | ||
required: false | ||
default: 'unknown-job' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Setup PNPM | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: ^8.6.0 | ||
run_install: false | ||
|
||
- name: Setup Node ${{ inputs.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
cache: 'pnpm' | ||
|
||
- name: Setup Python ${{ inputs.python-version }} | ||
id: setup-python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: | | ||
requirements.lock | ||
requirements-dev.lock | ||
- name: Setup Nx cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules/.cache/nx | ||
# Including SHA in the key causes a cache miss with every commit | ||
# This is desired because we want cache results to always be updated | ||
# while we will be using restore-keys to select the closest cache | ||
key: cache-nx-${{ github.ref }}-${{ runner.os }}-${{ inputs.python-version }}-${{ inputs.node-version }}-${{ inputs.job-name }}-${{ github.sha }} | ||
restore-keys: | | ||
cache-nx-${{ github.ref }}-${{ runner.os }}-${{ inputs.python-version }}-${{ inputs.node-version }}-${{ inputs.job-name }} | ||
cache-nx-${{ github.ref }}-${{ runner.os }}-${{ inputs.python-version }}-${{ inputs.node-version }} | ||
cache-nx-${{ github.ref }}-${{ runner.os }}-${{ inputs.python-version }} | ||
cache-nx-${{ github.ref }}-${{ runner.os }} | ||
cache-nx-${{ github.ref }} | ||
- name: Setup projects | ||
shell: bash | ||
run: pnpm bootstrap |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# https://github.com/sveltejs/kit/blob/32afba695088b946aefe96da75b36de9b0667fbe/.github/workflows/release.yml | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
release: | ||
# FIXME: change this to the canonical repo name | ||
# prevents this action from running on forks | ||
if: github.repository == 'example/example' | ||
permissions: | ||
contents: write # to create release (changesets/action) | ||
pull-requests: write # to create pull request (changesets/action) | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# fetch the full history for changesets to generate changelog | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/ci-setup | ||
|
||
- name: Build | ||
run: pnpm exec nx run-many --target=build --exclude docs,website | ||
|
||
- name: Create release PR or publish packages | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
# run changeset version to consume all changesets and bump versions | ||
version: pnpm run version | ||
# publish with Nx. won't call changeset publish but does call changeset tag | ||
publish: pnpm run release | ||
# commit message for the release commits | ||
commit: 'chore: stage changes for next release' | ||
# title of the release PR | ||
title: 'chore: release' |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DOCKER_USERNAME ?= $(shell whoami) | ||
# FIXME: change this to the desired Docker image name | ||
APPLICATION_NAME ?= example | ||
|
||
GIT_HASH ?= $(shell git log --format="%h" -n 1) | ||
|
||
image: | ||
docker buildx build \ | ||
--platform linux/amd64 \ | ||
-t ${DOCKER_USERNAME}/${APPLICATION_NAME}:${GIT_HASH} \ | ||
-f ./docker/example.Dockerfile . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM python:3.10-slim-bookworm AS node-setup |
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
Oops, something went wrong.