Skip to content

Commit

Permalink
Revert "chore: cleanup repository template"
Browse files Browse the repository at this point in the history
This reverts commit 38dc4dc.
  • Loading branch information
trieloff committed Jul 18, 2023
1 parent 38dc4dc commit 0c2dae8
Show file tree
Hide file tree
Showing 8 changed files with 18,093 additions and 7,360 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Please always provide the [GitHub issue(s)](../issues) your PR is for, as well a
Fix #<gh-issue-id>

Test URLs:
- Before: https://main--helix-project-boilerplate--adobe.hlx.page/
- After: https://<branch>--helix-project-boilerplate--adobe.hlx.page/
- Before: https://main--{repo}--{owner}.hlx.page/
- After: https://<branch>--{repo}--{owner}.hlx.page/
51 changes: 51 additions & 0 deletions .github/workflows/cleanup-on-create.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow will run upon repository creation and clean up
# all files that are not strictly required to build an AEM Live project
# but that we use to develop the project template. This includes this
# particular workflow file.
on:
create:
branches:
- main
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Uninstall dependencies
run: |
npm uninstall --save-dev semantic-release @semantic-release/git @semantic-release/changelog @semantic-release/exec
- name: Remove Helper Files
run: |
rm -rf \
.github/workflows/cleanup-on-create.yaml \
.github/workflows/semantic-release.yaml \
.releaserc.cjs \
CHANGELOG.md
- name: Initialize README
# replace {repo} and {owner} with the actual values
run: |
sed -i.bak "s/{repo}/$(basename ${{ github.repository }})/g" README.md
sed -i.bak "s/{owner}/$(dirname ${{ github.repository }})/g" README.md
- name: Initialize Pull Request Template
run: |
sed -i.bak "s/{repo}/$(basename ${{ github.repository }})/g" .github/pull_request_template.md
sed -i.bak "s/{owner}/$(dirname ${{ github.repository }})/g" .github/pull_request_template.md
# commit back to the repository
- name: Commit changes
run: |
git config --local user.email "helix@adobe.com"
git config --local user.name "Helix Bot"
git add .
git commit -m "chore: cleanup repository template"
git push
25 changes: 25 additions & 0 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generate a changelog with semantic-release
# Skip if the commit message is "Initial commit"
on:
push:
branches:
- main
jobs:
semantic-release:
if: "!contains(github.event.head_commit.message, 'Initial commit')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run semantic-release
- name: Show working copy
run: ls -la && git status
18 changes: 18 additions & 0 deletions .releaserc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md",
}],
["@semantic-release/npm", {
"publish": false,
}],
["@semantic-release/git", {
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
["@semantic-release/github", {}]
],
branches: ['main'],
};
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## [1.2.2](https://github.com/elc9aya2ls612j/helix-project-boilerplate/compare/v1.2.1...v1.2.2) (2023-06-29)


### Bug Fixes

* **github:** use double quotes ([d7e285d](https://github.com/elc9aya2ls612j/helix-project-boilerplate/commit/d7e285dbb452617a5166569f91da4cb376548a38))

## [1.2.1](https://github.com/elc9aya2ls612j/helix-project-boilerplate/compare/v1.2.0...v1.2.1) (2023-06-29)


### Bug Fixes

* **github:** create and ignore bak files ([ac087b6](https://github.com/elc9aya2ls612j/helix-project-boilerplate/commit/ac087b61d3e44910d980b0d9e7aead0f2ed83873))

# [1.2.0](https://github.com/elc9aya2ls612j/helix-project-boilerplate/compare/v1.1.0...v1.2.0) (2023-06-29)


### Features

* **github:** populate pull request template ([4ccb759](https://github.com/elc9aya2ls612j/helix-project-boilerplate/commit/4ccb7592a84fdc0d3d234fc4da5bdf94a026ff1d))

# [1.1.0](https://github.com/elc9aya2ls612j/helix-project-boilerplate/compare/v1.0.5...v1.1.0) (2023-06-29)


### Features

* **github:** remove dependencies upon fork, fill in readme ([7e60519](https://github.com/elc9aya2ls612j/helix-project-boilerplate/commit/7e60519c8ea97640bcb064cb3592990989fe10ef))

## [1.0.5](https://github.com/elc9aya2ls612j/helix-project-boilerplate/compare/v1.0.4...v1.0.5) (2023-06-29)


### Bug Fixes

* trigger release ([2c3244f](https://github.com/elc9aya2ls612j/helix-project-boilerplate/commit/2c3244fc181fd900293bbd7e67ab8e68e5d83d5d))
* trigger release ([5ac78b0](https://github.com/elc9aya2ls612j/helix-project-boilerplate/commit/5ac78b07955c0b75a37dfb293a5d616b7bdaffba))
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Your project's description...

## Environments
- Preview: https://main--helix-project-boilerplate--adobe.hlx.page/
- Live: https://main--helix-project-boilerplate--adobe.hlx.live/
- Preview: https://main--{repo}--{owner}.hlx.page/
- Live: https://main--{repo}--{owner}.hlx.live/

## Installation

Expand All @@ -23,4 +23,4 @@ npm run lint
1. Add the [helix-bot](https://github.com/apps/helix-bot) to the repository
1. Install the [Helix CLI](https://github.com/adobe/helix-cli): `npm install -g @adobe/helix-cli`
1. Start Franklin Proxy: `hlx up` (opens your browser at `http://localhost:3000`)
1. Open the `helix-project-boilerplate` directory in your favorite IDE and start coding :)
1. Open the `{repo}` directory in your favorite IDE and start coding :)
Loading

0 comments on commit 0c2dae8

Please sign in to comment.