Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
332 changes: 166 additions & 166 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -1,166 +1,166 @@
# This file was autogenerated using `zio-sbt-website` via `sbt generateGithubWorkflow`
# task and should be included in the git repository. Please do not edit it manually.

name: Website
'on':
workflow_dispatch: {}
release:
types:
- published
push:
branches:
- series/2.x
pull_request: {}
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Git Checkout
uses: actions/checkout@v3.3.0
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.9.0
with:
distribution: temurin
java-version: 17
check-latest: true
- uses: sbt/setup-sbt@v1
- name: Check artifacts build process
run: sbt -J-XX:+UseG1GC -J-Xmx6g -J-Xms6g -J-Xss16m +publishLocal
- name: Check website build process
run: sbt docs/clean; sbt docs/buildWebsite
update-readme:
name: Update README
runs-on: ubuntu-latest
continue-on-error: false
if: ${{ github.event_name == 'push' }}
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: coursier/setup-action@v1
with:
apps: 'sbt'
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Setup Scala
uses: actions/setup-java@v4
with:
distribution: corretto
java-version: '17'
check-latest: true
- uses: sbt/setup-sbt@v1
- name: Cache Dependencies
uses: coursier/cache-action@v6
- name: Generate Readme
run: sbt docs/generateReadme
- name: Commit Changes
run: |
git config --local user.email "zio-assistant[bot]@users.noreply.github.com"
git config --local user.name "ZIO Assistant"
git add README.md
git commit -m "Update README.md" || echo "No changes to commit"
- name: Generate Token
id: generate-token
uses: zio/generate-github-app-token@v1.0.0
with:
app_id: ${{ secrets.APP_ID }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
body: |-
Autogenerated changes after running the `sbt docs/generateReadme` command of the [zio-sbt-website](https://zio.dev/zio-sbt) plugin.

I will automatically update the README.md file whenever there is a new change for README.md, e.g.
- After each release, I will update the version in the installation section.
- After any changes to the "docs/index.md" file, I will update the README.md file accordingly.
branch: zio-sbt-website/update-readme
commit-message: Update README.md
token: ${{ steps.generate-token.outputs.token }}
delete-branch: true
title: Update README.md
- name: Approve PR
if: ${{ steps.cpr.outputs.pull-request-number }}
run: gh pr review "$PR_URL" --approve
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ steps.cpr.outputs.pull-request-url }}
- name: Enable Auto-Merge
if: ${{ steps.cpr.outputs.pull-request-number }}
run: gh pr merge --auto --squash "$PR_URL" || gh pr merge --squash "$PR_URL"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ steps.cpr.outputs.pull-request-url }}
publish-docs:
name: Publish Docs
runs-on: ubuntu-latest
if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
steps:
- name: Git Checkout
uses: actions/checkout@v3.3.0
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.9.0
with:
distribution: temurin
java-version: 17
check-latest:
- uses: sbt/setup-sbt@v1
- name: Setup NodeJs
uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: https://registry.npmjs.org
- name: Publish Docs to NPM Registry
run: sbt docs/publishToNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
notify-docs-release:
name: Notify Docs Release
runs-on: ubuntu-latest
continue-on-error: false
needs:
- publish-docs
if: ${{ (github.event_name == 'release') && (github.event.action == 'published') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1.11.1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: notify the main repo about the new release of docs package
run: |
PACKAGE_NAME=$(cat docs/package.json | grep '"name"' | awk -F'"' '{print $4}')
PACKAGE_VERSION=$(npm view $PACKAGE_NAME version)
response=$(curl -L -w "%{http_code}" \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ steps.generate-token.outputs.token }}"\
https://api.github.com/repos/zio/zio/dispatches \
-d '{
"event_type":"update-docs",
"client_payload":{
"package_name":"'"${PACKAGE_NAME}"'",
"package_version": "'"${PACKAGE_VERSION}"'"
}
}')

status_code=$(echo "$response" | tail -n 1)
echo "$response"
if [ "$status_code" != "204" ]; then
echo "Error: Expected status code 204, got $status_code"
exit 1
fi
## This file was autogenerated using `zio-sbt-website` via `sbt generateGithubWorkflow`
## task and should be included in the git repository. Please do not edit it manually.
#
#name: Website
#'on':
# workflow_dispatch: {}
# release:
# types:
# - published
# push:
# branches:
# - series/2.x
# pull_request: {}
#jobs:
# build:
# name: Build and Test
# runs-on: ubuntu-latest
# if: ${{ github.event_name == 'pull_request' }}
# steps:
# - name: Git Checkout
# uses: actions/checkout@v3.3.0
# with:
# fetch-depth: '0'
# - name: Setup Scala
# uses: actions/setup-java@v3.9.0
# with:
# distribution: temurin
# java-version: 17
# check-latest: true
# - uses: sbt/setup-sbt@v1
# - name: Check artifacts build process
# run: sbt -J-XX:+UseG1GC -J-Xmx6g -J-Xms6g -J-Xss16m +publishLocal
# - name: Check website build process
# run: sbt docs/clean; sbt docs/buildWebsite
# update-readme:
# name: Update README
# runs-on: ubuntu-latest
# continue-on-error: false
# if: ${{ github.event_name == 'push' }}
# steps:
# - name: Git Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: '0'
# - uses: coursier/setup-action@v1
# with:
# apps: 'sbt'
# - name: Install libuv
# run: sudo apt-get update && sudo apt-get install -y libuv1-dev
# - name: Setup Scala
# uses: actions/setup-java@v4
# with:
# distribution: corretto
# java-version: '17'
# check-latest: true
# - uses: sbt/setup-sbt@v1
# - name: Cache Dependencies
# uses: coursier/cache-action@v6
# - name: Generate Readme
# run: sbt docs/generateReadme
# - name: Commit Changes
# run: |
# git config --local user.email "zio-assistant[bot]@users.noreply.github.com"
# git config --local user.name "ZIO Assistant"
# git add README.md
# git commit -m "Update README.md" || echo "No changes to commit"
# - name: Generate Token
# id: generate-token
# uses: zio/generate-github-app-token@v1.0.0
# with:
# app_id: ${{ secrets.APP_ID }}
# app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
# - name: Create Pull Request
# id: cpr
# uses: peter-evans/create-pull-request@v6
# with:
# body: |-
# Autogenerated changes after running the `sbt docs/generateReadme` command of the [zio-sbt-website](https://zio.dev/zio-sbt) plugin.
#
# I will automatically update the README.md file whenever there is a new change for README.md, e.g.
# - After each release, I will update the version in the installation section.
# - After any changes to the "docs/index.md" file, I will update the README.md file accordingly.
# branch: zio-sbt-website/update-readme
# commit-message: Update README.md
# token: ${{ steps.generate-token.outputs.token }}
# delete-branch: true
# title: Update README.md
# - name: Approve PR
# if: ${{ steps.cpr.outputs.pull-request-number }}
# run: gh pr review "$PR_URL" --approve
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PR_URL: ${{ steps.cpr.outputs.pull-request-url }}
# - name: Enable Auto-Merge
# if: ${{ steps.cpr.outputs.pull-request-number }}
# run: gh pr merge --auto --squash "$PR_URL" || gh pr merge --squash "$PR_URL"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PR_URL: ${{ steps.cpr.outputs.pull-request-url }}
# publish-docs:
# name: Publish Docs
# runs-on: ubuntu-latest
# if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
# steps:
# - name: Git Checkout
# uses: actions/checkout@v3.3.0
# with:
# fetch-depth: '0'
# - name: Setup Scala
# uses: actions/setup-java@v3.9.0
# with:
# distribution: temurin
# java-version: 17
# check-latest:
# - uses: sbt/setup-sbt@v1
# - name: Setup NodeJs
# uses: actions/setup-node@v3
# with:
# node-version: 24.14.1
# registry-url: https://registry.npmjs.org
# - name: Publish Docs to NPM Registry
# run: sbt docs/publishToNpm
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# notify-docs-release:
# name: Notify Docs Release
# runs-on: ubuntu-latest
# continue-on-error: false
# needs:
# - publish-docs
# if: ${{ (github.event_name == 'release') && (github.event.action == 'published') }}
# steps:
# - name: Git Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: '0'
# - name: Generate a token
# id: generate-token
# uses: actions/create-github-app-token@v1.11.1
# with:
# app-id: ${{ secrets.APP_ID }}
# private-key: ${{ secrets.APP_PRIVATE_KEY }}
# owner: ${{ github.repository_owner }}
# - name: notify the main repo about the new release of docs package
# run: |
# PACKAGE_NAME=$(cat docs/package.json | grep '"name"' | awk -F'"' '{print $4}')
# PACKAGE_VERSION=$(npm view $PACKAGE_NAME version)
# response=$(curl -L -w "%{http_code}" \
# -X POST \
# -H "Accept: application/vnd.github+json" \
# -H "Authorization: token ${{ steps.generate-token.outputs.token }}"\
# https://api.github.com/repos/zio/zio/dispatches \
# -d '{
# "event_type":"update-docs",
# "client_payload":{
# "package_name":"'"${PACKAGE_NAME}"'",
# "package_version": "'"${PACKAGE_VERSION}"'"
# }
# }')
#
# status_code=$(echo "$response" | tail -n 1)
# echo "$response"
# if [ "$status_code" != "204" ]; then
# echo "Error: Expected status code 204, got $status_code"
# exit 1
# fi
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.12.4
sbt.version = 1.12.9
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.8")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.3")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.2")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.4.0-alpha.35")
addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.4.0-alpha.35")
addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.5.0")
addSbtPlugin("dev.zio" % "zio-sbt-ci" % "0.5.0")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.8")
Loading