Skip to content

Commit 615ad5c

Browse files
committed
Merge branch 'release/1.0.11'
2 parents 3f8704d + ddea5a0 commit 615ad5c

File tree

3 files changed

+44
-20
lines changed

3 files changed

+44
-20
lines changed

.github/workflows/template.yml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,77 @@
1-
# Workflow Name
1+
# Assign a name to the workflow.
22
name: Template Cleanup
33

4-
# Trigger the workflow on push events to the master branch
4+
# Specify when this workflow is going to be triggered.
55
on:
6+
# In this case, the workflow will be triggered whenever there is a push to the master branch.
67
push:
78
branches: [master]
89

9-
# Define jobs
10+
# Define the jobs that this workflow will perform.
1011
jobs:
11-
# Cleanup job
12+
# Declare a job named 'cleanup'.
1213
cleanup:
13-
# Job runs on the latest Ubuntu version
14+
# Specify the type of runner that the job should run on - Latest version of Ubuntu.
1415
runs-on: ubuntu-latest
1516

16-
# Permissions
17+
# Define permissions for this job.
1718
permissions:
1819
contents: write
1920

20-
# Conditional check
21+
# A conditional check to ensure the job runs only if the name of the repository meets the constraint.
2122
if: github.repository != 'nekofar/nextjs-lingui-template'
2223

23-
# Steps instances
24+
# Define the steps to be followed in this job.
2425
steps:
26+
# Checkout the code.
2527
- name: Checkout code
2628
uses: actions/[email protected]
2729

30+
# Set up Node.js environment.
2831
- name: Set up Node.js environment
2932
uses: actions/[email protected]
3033

31-
- name: Install pnpm package manager # Install pnpm
34+
# Install pnpm package manager.
35+
- name: Install pnpm package manager
3236
uses: pnpm/[email protected]
3337
with:
3438
version: ^8
3539
run_install: false
3640

41+
# Clean up the repository.
3742
- name: Clean up the repository
43+
# The 'run:' statement let's you execute commands directly.
3844
run: |
39-
# Declare variables
45+
# Declare and assign local variables.
4046
NAME="$(basename $GITHUB_REPOSITORY)"
4147
VERSION='1.0.0-alpha.0'
4248
43-
# Replace package.json name and version fields
44-
pnpm json -I -f package.json -e "this.name='${NAME}'"
45-
pnpm json -I -f package.json -e "this.version='${VERSION}'"
46-
pnpm install --no-frozen-lockfile # Install dependencies (ignoring lock file)
49+
# Use pnpm dlx json to modify package.json name and version fields.
50+
pnpm dlx json -I -f package.json -e "this.name='${NAME}'"
51+
pnpm dlx json -I -f package.json -e "this.version='${VERSION}'"
52+
pnpm dlx install --no-frozen-lockfile # Install dependencies (ignoring lock file)
4753
48-
# Remove unnecessary files
54+
# Remove template specific files and directories.
4955
rm -rf \
5056
.github/ISSUE_TEMPLATE \
5157
.github/workflows/template.yml \
5258
.github/dependabot.yml \
5359
.github/FUNDING.yml \
5460
.github/stale.yml \
55-
CHANGELOG.md
61+
CHANGELOG.md \
5662
README.md
5763
58-
- name: Create Pull Request # Generate a pull request
59-
uses: peter-evans/[email protected]
64+
# Commit the changes made to the repository.
65+
- name: Commit files
66+
run: |
67+
git config --local user.email "[email protected]"
68+
git config --local user.name "GitHub Action"
69+
git add .
70+
git commit -m 'chore: initial template cleanup'
71+
72+
# Push the changes to the repository.
73+
- name: Push changes
74+
uses: ad-m/github-push-action@master
6075
with:
61-
commit-message: 'chore: initial template cleanup' # Commit message
76+
branch: master
77+
github_token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.0.11] - 2023-07-30
6+
7+
### <!-- 07 -->Continuous Integrations
8+
9+
- Update pnpm commands in `template` workflows
10+
- Cdd README.md to `template` workflows
11+
- Update and enhance `template` workflow
12+
513
## [1.0.10] - 2023-07-30
614

715
### <!-- 07 -->Continuous Integrations

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-lingui-template",
3-
"version": "1.0.10",
3+
"version": "1.0.11",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",

0 commit comments

Comments
 (0)