-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
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,14 @@ | ||
name: "Pull Request Changelog Enforcement Workflow" | ||
on: | ||
pull_request: | ||
# The specific activity types are listed here to include "labeled" and "unlabeled" since the enforcer allows for skipping enforcement of the changelog being edited via the "skipLabels" property | ||
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | ||
|
||
jobs: | ||
# Enforces the update of a changelog file on every pull request | ||
changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# The checkout step is required since this action uses local git commands to enforce the changelog | ||
- uses: actions/checkout@master | ||
- uses: dangoslen/changelog-enforcer@v3 |
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,38 @@ | ||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0.0 | ||
|
||
name: Create Release | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@master | ||
- name: Set RELEASE_VERSION environment variable | ||
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: '22.x' | ||
- run: npm ci | ||
- run: npm run build | ||
- name: Publish to NPM | ||
run: | | ||
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} | ||
npm publish --ignore-scripts --access public | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Create artifact | ||
run: | | ||
mkdir ${{ env.RELEASE_VERSION }}-dist && cp dist/farmOS-timeline* ${{ env.RELEASE_VERSION }}-dist && zip -r ${{ env.RELEASE_VERSION }}-dist.zip ${{ env.RELEASE_VERSION }}-dist | ||
- name: Create Release | ||
uses: softprops/action-gh-release@6034af24fba4e5a8e975aaa6056554efe4c794d0 #0.1.13 | ||
with: | ||
body: | | ||
See [CHANGELOG.md](https://github.com/farmOS/farmOS-timeline/blob/${{ env.RELEASE_VERSION }}/CHANGELOG.md) for release notes. | ||
files: ${{ env.RELEASE_VERSION }}-dist.zip | ||
draft: false | ||
prerelease: false |
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,24 @@ | ||
name: Run build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Run build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: '22.x' | ||
- run: npm ci | ||
- run: npm run build | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: dist |