Skip to content

Release v2.2.5 #151

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

Merged
merged 55 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
c2138ab
Merge branch 'release/2.2.4' into develop
ansidev May 31, 2023
e91bad5
chore(deps): update dependency dotenv to ^16.1.3
renovate[bot] May 31, 2023
d8abc3a
Merge pull request #124 from ansidev/renovate/dotenv-16.x
ansidev Jun 1, 2023
c7b951a
chore(deps): update dependency typescript to ^5.1.3
renovate[bot] Jun 1, 2023
ef91c76
Merge pull request #125 from ansidev/renovate/typescript-5.x
ansidev Jun 2, 2023
9289c48
chore(deps): update dependency @iconify-json/bi to ^1.1.17
renovate[bot] Jun 2, 2023
50cf3ba
chore(deps): update dependency dayjs to ^1.11.8
renovate[bot] Jun 2, 2023
478cc76
Merge pull request #126 from ansidev/renovate/iconify-json-bi-1.x
ansidev Jun 2, 2023
480b8cb
Merge pull request #127 from ansidev/renovate/dayjs-1.x
ansidev Jun 2, 2023
f03d47a
fix(deps): update dependency @astrojs/sitemap to ^1.3.3
renovate[bot] Jun 2, 2023
920dd46
fix(deps): update dependency astro to v2.5.7
renovate[bot] Jun 2, 2023
11e58ac
Merge pull request #128 from ansidev/renovate/astrojs-sitemap-1.x
ansidev Jun 2, 2023
8e83a61
Merge pull request #129 from ansidev/renovate/astro-2.x
ansidev Jun 2, 2023
43c718b
chore(deps): update dependency eslint to ^8.42.0
renovate[bot] Jun 3, 2023
75edc05
Merge pull request #130 from ansidev/renovate/eslint-8.x
ansidev Jun 3, 2023
24f62de
chore(deps): update dependency satori to ^0.10.0
renovate[bot] Jun 3, 2023
1ee76ed
Merge pull request #131 from ansidev/renovate/satori-0.x
ansidev Jun 4, 2023
25ce47b
fix(deps): update dependency astro-compress to ^1.1.47
renovate[bot] Jun 4, 2023
4fe8a4b
Merge pull request #132 from ansidev/renovate/astro-compress-1.x
ansidev Jun 4, 2023
5e39406
chore(deps): update dependency dotenv to ^16.1.4
renovate[bot] Jun 4, 2023
d269d6b
Merge pull request #133 from ansidev/renovate/dotenv-16.x
ansidev Jun 5, 2023
24d0bd9
chore(deps): update dependency satori to ^0.10.1
renovate[bot] Jun 5, 2023
95232ac
Merge pull request #134 from ansidev/renovate/satori-0.x
ansidev Jun 5, 2023
25405d5
chore(deps): update pnpm to v8.6.1
renovate[bot] Jun 5, 2023
e039642
Merge pull request #135 from ansidev/renovate/pnpm-8.x
ansidev Jun 5, 2023
fda40ef
chore(deps): update typescript-eslint monorepo to ^5.59.9
renovate[bot] Jun 5, 2023
04a3120
Merge pull request #136 from ansidev/renovate/typescript-eslint-monorepo
ansidev Jun 6, 2023
f2777ae
fix(deps): update dependency astro to v2.6.0
renovate[bot] Jun 6, 2023
9a54b99
Merge pull request #137 from ansidev/renovate/astro-2.x
ansidev Jun 6, 2023
d674baa
fix(deps): update dependency astro to v2.6.1
renovate[bot] Jun 6, 2023
1e334c0
Merge pull request #138 from ansidev/renovate/astro-2.x
ansidev Jun 7, 2023
1543149
chore(deps): update dependency sass to ^1.63.0
renovate[bot] Jun 7, 2023
1432758
Merge pull request #139 from ansidev/renovate/sass-1.x
ansidev Jun 8, 2023
be3956c
chore(deps): update dependency sass to ^1.63.2
renovate[bot] Jun 8, 2023
a652511
Merge pull request #141 from ansidev/renovate/sass-1.x
ansidev Jun 9, 2023
92daf1c
fix(deps): update dependency astro to v2.6.2
renovate[bot] Jun 9, 2023
e3fccd8
Merge pull request #142 from ansidev/renovate/astro-2.x
ansidev Jun 9, 2023
918b3d1
chore(deps): update dependency sass to ^1.63.3
renovate[bot] Jun 9, 2023
d963d9c
Merge pull request #143 from ansidev/renovate/sass-1.x
ansidev Jun 9, 2023
6c5d027
chore(deps): update dependency @fontsource/ibm-plex-mono to ^5.0.3
renovate[bot] Jun 10, 2023
cb2eedc
Merge pull request #144 from ansidev/renovate/fontsource-ibm-plex-mon…
ansidev Jun 10, 2023
22c042c
fix(deps): update dependency astro to v2.6.3
renovate[bot] Jun 10, 2023
69b6e0b
Merge pull request #145 from ansidev/renovate/astro-2.x
ansidev Jun 10, 2023
a8b1090
chore(deps): update pnpm to v8.6.2
renovate[bot] Jun 11, 2023
7dae8d9
Merge pull request #146 from ansidev/renovate/pnpm-8.x
ansidev Jun 11, 2023
11ff133
chore(deps): update typescript-eslint monorepo to ^5.59.11
renovate[bot] Jun 12, 2023
5b63a63
Merge pull request #147 from ansidev/renovate/typescript-eslint-monorepo
ansidev Jun 12, 2023
13b58ec
refactor(github-workflow): apply GitHub Actions from ghacts/gitflow
ansidev Jun 13, 2023
f82d85f
Merge pull request #148 from ansidev/feature/refactor-gitflow-workflows
ansidev Jun 13, 2023
b285b8b
chore: update lint script
ansidev Jun 13, 2023
755d555
refactor(github-workflow): apply GitHub Actions from ghacts
ansidev Jun 13, 2023
27b6fbe
Merge pull request #149 from ansidev/feature/refactor-deploy-workflow
ansidev Jun 13, 2023
f263961
fix: wrong github environment url
ansidev Jun 13, 2023
4ad1643
Merge pull request #150 from ansidev/patchfix/github-environment-url
ansidev Jun 13, 2023
814b2b0
chore(release): v2.2.5
ansidev Jun 13, 2023
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
31 changes: 31 additions & 0 deletions .changes/v2.2.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## [v2.2.5](https://github.com/ansidev/leetcode-blog/compare/v2.2.4...v2.2.5) (2023-06-13)

### Bug Fixes

- **github-workflow:** wrong github environment url

### Code Refactoring

- **github-workflow:** apply GitHub Actions from ghacts

- **github-workflow:** apply GitHub Actions from ghacts/gitflow

### Dependencies

| Package | Version |
| ---------------------------------- | ------------------------- |
| `@astrojs/sitemap` | `^1.3.2` `->` `^1.3.3` |
| `astro` | `^2.5.6` `->` `2.6.3` |
| `astro-compress` | `^1.1.46` `->` `^1.1.47` |
| `@fontsource/ibm-plex-mono` | `^5.0.2` `->` `^5.0.3` |
| `@iconify-json/bi` | `^1.1.16` `->` `^1.1.17` |
| `@typescript-eslint/eslint-plugin` | `^5.59.8` `->` `^5.59.11` |
| `@typescript-eslint/parser` | `^5.59.8` `->` `^5.59.11` |
| `dayjs` | `^1.11.7` `->` `^1.11.8` |
| `dotenv` | `^16.1.1` `->` `^16.1.4` |
| `eslint` | `^8.41.0` `->` `^8.42.0` |
| `sass` | `^1.62.1` `->` `^1.63.3` |
| `satori` | `^0.9.1` `->` `^0.10.1` |
| `typescript` | `^5.0.4` `->` `^5.1.3` |

Full Changelog: [v2.2.4...v2.2.5](https://github.com/ansidev/leetcode-blog/compare/v2.2.4...v2.2.5)
40 changes: 0 additions & 40 deletions .github/workflows/auto_merge_release_hotfix_into_develop.yaml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/create_release_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: create_release_pr

on:
push:
branches:
- "release/**"
- "hotfix/**"

jobs:
create_release_pr:
name: Create release pull request
runs-on: ubuntu-latest
permissions:
contents: write
# only create draft pull requests on
# pushing to branches 'release/' or 'hotfix/'
if: |
startsWith(github.ref_name, 'release/') ||
startsWith(github.ref_name, 'hotfix/')

steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
token: ${{ secrets.GH_TOKEN }}
# needed by "gh pr create"
fetch-depth: 0

- name: Set release type as release
if: startsWith(github.ref_name, 'release/')
run: echo "RELEASE_TYPE=release" >> "$GITHUB_ENV"

- name: Set release type as hotfix
if: startsWith(github.ref_name, 'hotfix/')
run: echo "RELEASE_TYPE=hotfix" >> "$GITHUB_ENV"

- name: Create release pull request
uses: ghacts/gitflow/create-release-pr@main
with:
token: ${{ secrets.GH_TOKEN }}
release-type: ${{ env.RELEASE_TYPE }}
release-branch-prefix: '${{ env.RELEASE_TYPE }}/'
147 changes: 27 additions & 120 deletions .github/workflows/deploy_to_netlify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_SITE_NAME: ${{ vars.NETLIFY_SITE_NAME }}
DEPLOY_DIR: dist

jobs:
Expand Down Expand Up @@ -80,140 +81,46 @@ jobs:
needs: set_deploy_environment
environment:
name: ${{ needs.set_deploy_environment.outputs.github_environment }}
url: ${{ steps.post_deploy.outputs.netlify_deploy_url }}
url: ${{ steps.deploy.outputs.netlify-deploy-url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get PNPM store directory
id: pnpm-cache
run: echo "pnpm_store_path=$(pnpm store path)" >> "$GITHUB_OUTPUT"

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

- name: Install dependencies
run: pnpm install

- name: Install Netlify CLI
run: pnpm add --save-dev netlify-cli

- name: Set as production environment
if: needs.set_deploy_environment.outputs.github_environment == 'production'
run: echo "PROD=true" >> "$GITHUB_ENV"

- name: Deploy ${{ needs.set_deploy_environment.outputs.github_environment }}
id: deploy
if: success()
- name: Set app environment variables
env:
NETLIFY_DEPLOY_PREFIX: ${{ needs.set_deploy_environment.outputs.netlify_deploy_prefix }}
NETLIFY_DEPLOY_ALIAS: ${{ needs.set_deploy_environment.outputs.netlify_deploy_alias }}
SITE_GA_ID: ${{ vars.SITE_GA_ID }}
SITE_SWETRIX_ID: ${{ vars.SITE_SWETRIX_ID }}
SITE_COUNTER_ANALYTICS_ID: ${{ vars.SITE_COUNTER_ANALYTICS_ID }}
SITE_DISQUS_ID: ${{ vars.SITE_DISQUS_ID }}
shell: bash
run: |
set -e
([[ ${PROD:-false} == "true" ]] && \
OUTPUT=$(GA_ID=$SITE_GA_ID \
SWETRIX_ID="${SITE_SWETRIX_ID}" \
COUNTER_ANALYTICS_ID="${SITE_COUNTER_ANALYTICS_ID}" \
DISQUS_ID="${SITE_DISQUS_ID}" \
pnpm netlify deploy \
--auth ${{ env.NETLIFY_AUTH_TOKEN }} \
--site ${{ env.NETLIFY_SITE_ID }} \
--json \
--build \
--context production \
--message "$(git log -1 --pretty=%s)" \
--prod \
| tr '\n' ' ')) || \
OUTPUT=$(
SWETRIX_ID="${SITE_SWETRIX_ID}" \
COUNTER_ANALYTICS_ID="${SITE_COUNTER_ANALYTICS_ID}" \
DISQUS_ID="${SITE_DISQUS_ID}" \
pnpm netlify deploy \
--auth ${{ env.NETLIFY_AUTH_TOKEN }} \
--site ${{ env.NETLIFY_SITE_ID }} \
--json \
--build \
--context deploy-preview \
--alias "${NETLIFY_DEPLOY_ALIAS}" \
--message "$(git log -1 --pretty=%s)" \
| tr '\n' ' ')
set +e

NETLIFY_OUTPUT="$OUTPUT"
{
echo "ASTRO_BASE_URL=https://${NETLIFY_DEPLOY_PREFIX}${NETLIFY_SITE_NAME}.netlify.app"
echo "NETLIFY_DEPLOY_ALIAS=${NETLIFY_DEPLOY_ALIAS}"
echo "GA_ID=${SITE_GA_ID}"
echo "SWETRIX_ID=${SITE_SWETRIX_ID}"
echo "COUNTER_ANALYTICS_ID=${SITE_COUNTER_ANALYTICS_ID}"
echo "DISQUS_ID=${SITE_DISQUS_ID}"
} >> "$GITHUB_ENV"

echo "netlify_output=$NETLIFY_OUTPUT" >> "$GITHUB_OUTPUT"
echo "success=true" >> "$GITHUB_OUTPUT"
- name: Build
uses: ghacts/static-site@main
with:
node-version: 18
skip-test: true
lint-script: "lint:js"

- name: Post deploy ${{ needs.set_deploy_environment.outputs.github_environment }}
id: post_deploy
if: success()
- name: Deploy
id: deploy
uses: ghacts/manual-deploy-to-netlify@main
env:
NETLIFY_DRAFT_URL: ${{ fromJson(steps.deploy.outputs.netlify_output).deploy_url }}
NETLIFY_PROD_URL: ${{ fromJson(steps.deploy.outputs.netlify_output).url }}
run: |
[[ ${PROD:-false} == "true" ]] && \
echo "netlify_deploy_url=$NETLIFY_PROD_URL" >> "$GITHUB_OUTPUT" || \
echo "netlify_deploy_url=$NETLIFY_DRAFT_URL" >> "$GITHUB_OUTPUT"
PROD: ${{ needs.set_deploy_environment.outputs.github_environment == 'production' }}
with:
auth-token: ${{ env.NETLIFY_AUTH_TOKEN }}
site-id: ${{ env.NETLIFY_SITE_ID }}
dir: ${{ env.DEPLOY_DIR }}
alias: ${{ env.NETLIFY_DEPLOY_ALIAS }}
prod: ${{ env.PROD }}

- name: Debug deploy ${{ needs.set_deploy_environment.outputs.github_environment }}
id: debug-deploy
if: always() && (steps.deploy.outcome == 'failure' || steps.post_deploy.outcome == 'failure' )
env:
NETLIFY_DEPLOY_PREFIX: ${{ needs.set_deploy_environment.outputs.netlify_deploy_prefix }}
NETLIFY_DEPLOY_ALIAS: ${{ needs.set_deploy_environment.outputs.netlify_deploy_alias }}
SITE_GA_ID: ${{ vars.SITE_GA_ID }}
SITE_SWETRIX_ID: ${{ vars.SITE_SWETRIX_ID }}
SITE_COUNTER_ANALYTICS_ID: ${{ vars.SITE_COUNTER_ANALYTICS_ID }}
SITE_DISQUS_ID: ${{ vars.SITE_DISQUS_ID }}
shell: bash
run: |
echo "node version $(node -v)"
echo "pnpm version $(pnpm -v)"
([[ ${PROD:-false} == "true" ]] && \
GA_ID=$SITE_GA_ID \
SWETRIX_ID="${SITE_SWETRIX_ID}" \
COUNTER_ANALYTICS_ID="${SITE_COUNTER_ANALYTICS_ID}" \
DISQUS_ID="${SITE_DISQUS_ID}" \
pnpm netlify deploy \
--auth ${{ env.NETLIFY_AUTH_TOKEN }} \
--site ${{ env.NETLIFY_SITE_ID }} \
--build \
--context production \
--message "$(git log -1 --pretty=%s)" \
--prod) || \
GA_ID=$SITE_GA_ID \
SWETRIX_ID="${SITE_SWETRIX_ID}" \
COUNTER_ANALYTICS_ID="${SITE_COUNTER_ANALYTICS_ID}" \
DISQUS_ID="${SITE_DISQUS_ID}" \
pnpm netlify deploy \
--auth ${{ env.NETLIFY_AUTH_TOKEN }} \
--site ${{ env.NETLIFY_SITE_ID }} \
--build \
--context deploy-preview \
--alias "${NETLIFY_DEPLOY_ALIAS}" \
--message "$(git log -1 --pretty=%s)"
outputs:
success: ${{ steps.deploy.outputs.success }}

Expand Down
86 changes: 0 additions & 86 deletions .github/workflows/draft_release_hotfix_pr.yaml

This file was deleted.

Loading