-
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.
docs: include details on how to trigger another workflow and customis…
…e the git author (#80)
- Loading branch information
Showing
13 changed files
with
56 additions
and
287 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
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
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 |
---|---|---|
@@ -1,32 +1,12 @@ | ||
# Copyright (c) 2021 Gemba Advantage | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# in the Software without restriction, including without limitation the rights | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
interval: 'daily' | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: "daily" | ||
interval: 'daily' | ||
allow: | ||
- dependency-type: "production" | ||
- dependency-type: 'production' |
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 |
---|---|---|
@@ -1,23 +1,3 @@ | ||
# Copyright (c) 2021 Gemba Advantage | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# in the Software without restriction, including without limitation the rights | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in all | ||
# copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
|
||
name: ci | ||
on: | ||
push: | ||
|
@@ -29,23 +9,30 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: npm run test | ||
|
||
- name: Code Coverage | ||
uses: codecov/[email protected] | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Tag | ||
if: github.ref == 'refs/heads/main' | ||
uses: gembaadvantage/uplift-action@v2 | ||
|
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
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 |
---|---|---|
@@ -1,56 +1,77 @@ | ||
# Uplift Github Action | ||
|
||
[![Build status](https://img.shields.io/github/workflow/status/gembaadvantage/uplift-action/ci?style=flat-square&logo=typescript)](https://github.com/gembaadvantage/uplift-action/actions?workflow=ci) | ||
[![Build status](https://img.shields.io/github/actions/workflow/status/gembaadvantage/uplift-action/ci.yml?style=flat-square&logo=typescript)](https://github.com/gembaadvantage/uplift-action/actions?workflow=ci) | ||
[![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](/LICENSE) | ||
[![codecov](https://codecov.io/gh/gembaadvantage/uplift-action/branch/main/graph/badge.svg)](https://codecov.io/gh/gembaadvantage/uplift-action) | ||
|
||
A Github Action for the [Uplift](https://github.com/gembaadvantage/uplift) semantic versioning tool. | ||
|
||
## Usage | ||
## Basic Usage | ||
|
||
Easily integrate uplift into your existing workflows, by using `@v2` of the action: | ||
Easily integrate uplift into your existing workflows, by using `v2` of the action: | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: gembaadvantage/uplift-action@v2 | ||
with: | ||
args: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
## Triggering another Workflow | ||
If you need uplift to trigger another workflow after it has tagged your repository, you will need to associate a custom personal access token with the `GITHUB_TOKEN`. This is by [design](https://docs.github.com/en/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow). | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_UPLIFT }} | ||
- uses: gembaadvantage/uplift-action@v2 | ||
with: | ||
args: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_UPLIFT }} | ||
``` | ||
|
||
You can also configure the behaviour of uplift by setting its inputs: | ||
## Customising the Git Author | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: gembaadvantage/uplift-action@v2 | ||
with: | ||
version: latest | ||
install-only: true | ||
args: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
By default, uplift will interact with git as the [uplift-bot](https://github.com/uplift-bot). To configure this behaviour, you have two options: | ||
|
||
1. Set the git author directly through uplift [configuration](https://upliftci.dev/reference/config/#commitauthor): | ||
|
||
```yaml | ||
# .uplift.yaml | ||
commitAuthor: | ||
name: 'joe.bloggs' | ||
email: '[email protected]' | ||
``` | ||
|
||
1. [Import](https://upliftci.dev/commit-signing/) a GPG key (_recommended_): | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_UPLIFT }} | ||
- uses: gembaadvantage/uplift-action@v2 | ||
with: | ||
args: release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_UPLIFT }} | ||
UPLIFT_GPG_KEY: "${{ secrets.UPLIFT_GPG_KEY }}" | ||
UPLIFT_GPG_PASSPHRASE: "${{ secrets .UPLIFT_GPG_PASSPHRASE }}" | ||
UPLIFT_GPG_FINGERPRINT: "${{ secrets.UPLIFT_GPG_FINGERPRINT }}" | ||
``` | ||
|
||
### Inputs | ||
|
||
|
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
Oops, something went wrong.