-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec53471
commit b21daf0
Showing
7 changed files
with
193 additions
and
30 deletions.
There are no files selected for viewing
This file was deleted.
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 |
---|---|---|
|
@@ -80,7 +80,6 @@ jobs: | |
percy: | ||
name: Run Percy check | ||
if: github.repository == 'KonradSzwarc/devscard' | ||
needs: deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -111,3 +110,27 @@ jobs: | |
with: | ||
urls: ${{ needs.deploy.outputs.deploy-url }} | ||
device: all | ||
|
||
release: | ||
name: Create release | ||
if: github.repository == 'KonradSzwarc/devscard' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get project information | ||
id: projectinfo | ||
uses: gregoranders/[email protected] | ||
- name: Get changelog entries | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@v2 | ||
with: | ||
version: ${{ steps.projectinfo.outputs.version }} | ||
- name: Create a new tag and release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.changelog_reader.outputs.version }} | ||
name: Release ${{ steps.changelog_reader.outputs.version }} | ||
body: ${{ steps.changelog_reader.outputs.changes }} | ||
allowUpdates: true |
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 |
---|---|---|
|
@@ -3,8 +3,78 @@ name: Pull Request | |
on: | ||
pull_request: | ||
branches: [main] | ||
types: [opened, edited, synchronize] | ||
|
||
jobs: | ||
lint-title: | ||
name: Validate PR title | ||
if: github.repository == 'KonradSzwarc/devscard' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
requireScope: false | ||
|
||
version: | ||
name: Check package.json version | ||
if: github.repository == 'KonradSzwarc/devscard' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Get project information | ||
id: projectinfo-current | ||
uses: gregoranders/[email protected] | ||
- name: Checkout main branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.base.sha }} | ||
- name: Get project information | ||
id: projectinfo-main | ||
uses: gregoranders/[email protected] | ||
- name: Get next possible versions | ||
id: semvers | ||
uses: WyriHaximus/github-action-next-semvers@v1 | ||
with: | ||
version: ${{ steps.projectinfo-main.outputs.version }} | ||
- name: Assert correct version bump | ||
uses: nick-fields/assert-action@v1 | ||
with: | ||
expected: ${{ steps.projectinfo-current.outputs.version }} | ||
actual: 'Possible version bumps: ${{ steps.semvers.outputs.patch }}, ${{ steps.semvers.outputs.minor }}, ${{ steps.semvers.outputs.major }}' | ||
comparison: contains | ||
|
||
changelog: | ||
name: Check changelog | ||
if: github.repository == 'KonradSzwarc/devscard' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
- name: Get project information | ||
id: projectinfo | ||
uses: gregoranders/[email protected] | ||
- name: Enforce changelog update | ||
uses: dangoslen/changelog-enforcer@v3 | ||
with: | ||
expectedLatestVersion: ${{ steps.projectinfo.outputs.version }} | ||
- name: Get changelog entries | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@v2 | ||
with: | ||
version: ${{ steps.projectinfo.outputs.version }} | ||
- name: Assert correct changelog version | ||
uses: nick-fields/assert-action@v1 | ||
with: | ||
expected: ${{ steps.projectinfo.outputs.version }} | ||
actual: ${{ steps.changelog_reader.outputs.version }} | ||
|
||
prettier: | ||
name: Run Prettier check | ||
runs-on: ubuntu-latest | ||
|
@@ -50,6 +120,7 @@ jobs: | |
percy: | ||
name: Run Percy check | ||
if: github.repository == 'KonradSzwarc/devscard' | ||
needs: [prettier, typescript, astro, lint-title, version, changelog] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -70,7 +141,7 @@ jobs: | |
|
||
preview: | ||
name: Create deploy preview | ||
needs: [prettier, typescript, astro] | ||
needs: [prettier, typescript, astro, lint-title, version, changelog] | ||
if: github.repository == 'KonradSzwarc/devscard' | ||
runs-on: ubuntu-latest | ||
outputs: | ||
|
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,15 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
## [0.0.1] - 2023-02-07 | ||
|
||
### Workflow | ||
|
||
- ci: add `package.json` version and changelog check to PR workflow. | ||
- ci: setup release workflow on the `main` branch. | ||
|
||
### Docs | ||
|
||
- docs: create changelog file. | ||
- docs: add [contributing page](https://devscard.gitbook.io/docs/contributing). |
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,68 @@ | ||
# Contributing | ||
|
||
## PR workflow | ||
|
||
### Maintainers | ||
|
||
1. Create a pull request with a title matching the conventional commits convention. | ||
2. Wait for all required checks to pass. | ||
3. If you got a failing Percy check, it's okay as long as your PR was supposed to affect UI. Go to Percy's dashboard and review your visual changes. | ||
4. Assign PR for one (or a few) of the maintainers. | ||
5. Your PR is ready to merge when you have at least one approval and no unresolved threads. | ||
6. Update the date in the changelog to be the current one. | ||
7. Wait for checks to pass again and merge PR. | ||
|
||
### Outside contributors | ||
|
||
In progress... | ||
|
||
## Versioning and changelog | ||
|
||
As this project is used in a fork-based way, each merge to the `main` branch should contain the following: | ||
|
||
- a version bump in `package.json`, | ||
- a new entry in the `CHANGELOG.md`. | ||
|
||
For the `CHANGELOG.md`, each update should look like follows: | ||
|
||
```md | ||
## [<version>] - <date> | ||
|
||
**Related issue:** <issue-link> | ||
|
||
### <affected> | ||
|
||
<description> | ||
``` | ||
|
||
### Semantic versioning (\<version>) | ||
|
||
Helps users to determine the changes made between their fork version and the recent version. | ||
|
||
- Patch change (0.0.x) — bug fixes, refactors, docs, and dependency updates. | ||
- Minor change (0.x.0) — features. | ||
- Major change (x.0.0) — not used until we release a stable project version (1.0.0). | ||
|
||
### Change date (\<date>) | ||
|
||
Date when changes were merged written in YYYY-MM-DD format. | ||
|
||
### Related issue (\<issue-link>) | ||
|
||
If the changes are related to a particular issue, provide its URL. | ||
|
||
### Affected components (\<affected>) | ||
|
||
Determines what parts of the project were affected by changes. | ||
|
||
- Docs — documentation updates. | ||
- Dependencies — dependency updates. | ||
- Workflow — changes in the development workflow. | ||
- Web — changes related to the web version of the resume. | ||
- Pdf — changes related to the pdf version of the resume. | ||
- Schema — some optional schema properties were added. | ||
- Schema (breaking) — some required schema properties were added, some properties were renamed/removed, data structure changed. | ||
|
||
### Description | ||
|
||
A short description of the changes you made. If your changes require some actions on project forks, remember to describe them. |
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
b21daf0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://devscard.netlify.app as production
🚀 Deployed on https://63e3828d003abc18534d3b02--devscard.netlify.app