Skip to content

Commit 7a70692

Browse files
author
Alex Plischke
authored
ci: add release pipeline (#12)
1 parent 710d006 commit 7a70692

File tree

5 files changed

+4929
-359
lines changed

5 files changed

+4929
-359
lines changed

.github/workflows/release.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseType:
7+
description: 'Release type - major, minor or patch'
8+
required: true
9+
default: 'patch'
10+
preReleaseFlavor:
11+
description: 'Pre-Release flavor - rc, beta, or anything. Pre-Releases are always patch releases.'
12+
required: false
13+
default: ''
14+
15+
jobs:
16+
release:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
ref: ${{ github.ref }}
23+
fetch-depth: 0
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version-file: .nvmrc
29+
cache: 'npm'
30+
31+
- name: Install Dependencies
32+
run: npm ci
33+
34+
- name: Setup Git
35+
run: |
36+
git config --global user.name "devx-sauce-bot"
37+
git config --global user.email "[email protected]"
38+
39+
- name: Setup NPM
40+
run: npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }}
41+
42+
- name: Pre-Release
43+
if: ${{ github.event.inputs.preReleaseFlavor != '' }}
44+
run: npm run release:ci -- --preRelease=${{ github.event.inputs.preReleaseFlavor }}
45+
env:
46+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
49+
- name: Release
50+
if: ${{ github.event.inputs.preReleaseFlavor == '' }}
51+
run: npm run release:ci -- ${{ github.event.inputs.releaseType }}
52+
env:
53+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
54+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

CONTRIBUTING.md

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
1-
# Contributing to _projectname_
1+
# Contributing
22

3-
**Thank you for your interest in _projectname_. Your contributions are highly welcome.**
3+
**Thank you for your interest. Your contributions are highly welcome.**
44

55
There are multiple ways of getting involved:
66

7-
- [Report a bug](#report-a-bug)
8-
- [Suggest a feature](#suggest-a-feature)
9-
- [Contribute code](#contribute-code)
7+
- [Report a bug](#report-a-bug)
8+
- [Suggest a feature](#suggest-a-feature)
9+
- [Contribute code](#contribute-code)
1010

1111
Below are a few guidelines we would like you to follow.
1212
If you need help, please reach out to us by opening an issue.
1313

14-
## Report a bug
14+
## Report a bug
15+
1516
Reporting bugs is one of the best ways to contribute. Before creating a bug report, please check that an [issue](/issues) reporting the same problem does not already exist. If there is such an issue, you may add your information as a comment.
1617

1718
To report a new bug you should open an issue that summarizes the bug and set the label to "bug".
1819

1920
If you want to provide a fix along with your bug report: That is great! In this case please send us a pull request as described in section [Contribute Code](#contribute-code).
2021

2122
## Suggest a feature
22-
To request a new feature you should open an [issue](../../issues/new) and summarize the desired functionality and its use case. Set the issue label to "feature".
23+
24+
To request a new feature you should open an [issue](../../issues/new) and summarize the desired functionality and its use case. Set the issue label to "feature".
2325

2426
## Contribute code
27+
2528
This is an outline of what the workflow for code contributions looks like
2629

27-
- Check the list of open [issues](../../issues). Either assign an existing issue to yourself, or
28-
create a new one that you would like work on and discuss your ideas and use cases.
30+
- Check the list of open [issues](../../issues). Either assign an existing issue to yourself, or
31+
create a new one that you would like work on and discuss your ideas and use cases.
2932

3033
It is always best to discuss your plans beforehand, to ensure that your contribution is in line with our goals.
3134

3235
- Fork the repository on GitHub
3336
- Create a topic branch from where you want to base your work. This is usually master.
3437
- Open a new pull request, label it `work in progress` and outline what you will be contributing
3538
- Make commits of logical units.
36-
- Make sure you sign-off on your commits `git commit -s -m "adding X to change Y"`
39+
- Make sure you sign-off on your commits `git commit -s -m "adding X to change Y"`
3740
- Write good commit messages (see below).
3841
- Push your changes to a topic branch in your fork of the repository.
3942
- As you push your changes, update the pull request with new infomation and tasks as you complete them
@@ -44,11 +47,13 @@ It is always best to discuss your plans beforehand, to ensure that your contribu
4447
Thanks for your contributions!
4548

4649
### Commit messages
47-
Your commit messages ideally can answer two questions: what changed and why. The subject line should feature the “what” and the body of the commit should describe the “why”.
50+
51+
Your commit messages ideally can answer two questions: what changed and why. The subject line should feature the “what” and the body of the commit should describe the “why”.
4852

4953
When creating a pull request, its description should reference the corresponding issue id.
5054

5155
### Sign your work / Developer certificate of origin
56+
5257
All contributions (including pull requests) must agree to the Developer Certificate of Origin (DCO) version 1.1. This is exactly the same one created and used by the Linux kernel developers and posted on http://developercertificate.org/. This is a developer's certification that he or she has the right to submit the patch for inclusion into the project. Simply submitting a contribution implies this agreement, however, please include a "Signed-off-by" tag in every patch (this tag is a conventional way to confirm that you agree to the DCO) - you can automate this with a [Git hook](https://stackoverflow.com/questions/15015894/git-add-signed-off-by-line-using-format-signoff-not-working)
5358

5459
```

SECURITY.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
We acknowledge that every line of code that we write may potentially contain security issues.
2-
We are trying to deal with it responsibly and provide patches as quickly as possible.
2+
We are trying to deal with it responsibly and provide patches as quickly as possible.
33

4-
Please contact us via [E-Mail](mailto:opensource@saucelabs.com) immediately after discovery of the vulnerability. Thanks!
4+
Please contact us via [E-Mail](mailto:devx@saucelabs.com) immediately after discovery of the vulnerability. Thanks!

0 commit comments

Comments
 (0)