-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the GitHub actions workflow specifications (#77)
- Loading branch information
Showing
13 changed files
with
1,507 additions
and
2,229 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
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,21 @@ | ||
name: Setup | ||
description: Perform standard setup and install dependencies using pnpm. | ||
inputs: | ||
node-version: | ||
description: The version of Node.js to install | ||
required: true | ||
default: 20.16.0 | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
- name: Install node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: pnpm | ||
node-version: ${{ inputs.node-version }} | ||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install |
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,54 @@ | ||
name: Check | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
|
||
types: | ||
name: Types | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm check | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm lint | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm test |
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 |
---|---|---|
@@ -1,39 +1,34 @@ | ||
name: Main Flow | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
build: | ||
release: | ||
if: github.repository_owner = 'Effect-Ts' | ||
name: Release | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.9.0] | ||
|
||
timeout-minutes: 10 | ||
permissions: | ||
contents: write | ||
id-token: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: pnpm | ||
node-version: ${{ matrix.node-version }} | ||
- run: pnpm install | ||
- run: pnpm build | ||
- run: pnpm test | ||
- run: pnpm lint | ||
- run: pnpm docgen | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- name: Create Release Pull Request or Publish | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm update-version | ||
publish: pnpm changeset publish | ||
version: pnpm changeset-version | ||
publish: pnpm changeset-publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,51 @@ | ||
name: Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: ./.github/actions/setup | ||
- run: pnpm docgen | ||
- name: Build pages Jekyll | ||
if: github.repository_owner == 'Effect-Ts' && github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: actions/jekyll-build-pages@v1 | ||
with: | ||
source: ./docs | ||
destination: ./_site | ||
- name: Upload pages artifact | ||
if: github.repository_owner == 'Effect-Ts' && github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
uses: actions/upload-pages-artifact@v2 | ||
|
||
deploy: | ||
if: github.repository_owner == 'Effect-Ts' && github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
needs: build | ||
permissions: | ||
pages: write # To deploy to GitHub Pages | ||
id-token: write # To verify the deployment originates from an appropriate source | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,36 +1,22 @@ | ||
{ | ||
inputs = { | ||
nixpkgs = { | ||
url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
}; | ||
|
||
flake-utils = { | ||
url = "github:numtide/flake-utils"; | ||
}; | ||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
}; | ||
|
||
outputs = { | ||
self, | ||
nixpkgs, | ||
flake-utils, | ||
... | ||
}: | ||
flake-utils.lib.eachDefaultSystem (system: let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
corepackEnable = pkgs.runCommand "corepack-enable" {} '' | ||
mkdir -p $out/bin | ||
${pkgs.nodejs_20}/bin/corepack enable --install-directory $out/bin | ||
''; | ||
in { | ||
formatter = pkgs.alejandra; | ||
|
||
devShells = { | ||
default = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
nodejs_20 | ||
corepackEnable | ||
]; | ||
}; | ||
outputs = {nixpkgs, ...}: let | ||
forAllSystems = function: | ||
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed | ||
(system: function nixpkgs.legacyPackages.${system}); | ||
in { | ||
formatter = forAllSystems (pkgs: pkgs.alejandra); | ||
devShells = forAllSystems (pkgs: { | ||
default = pkgs.mkShell { | ||
packages = with pkgs; [ | ||
bun | ||
corepack | ||
deno | ||
nodejs | ||
]; | ||
}; | ||
}); | ||
}; | ||
} |
Oops, something went wrong.