Skip to content

Commit

Permalink
ci: add release pipeline (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexplischke authored Aug 16, 2024
1 parent 710d006 commit 7a70692
Show file tree
Hide file tree
Showing 5 changed files with 4,929 additions and 359 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release

on:
workflow_dispatch:
inputs:
releaseType:
description: 'Release type - major, minor or patch'
required: true
default: 'patch'
preReleaseFlavor:
description: 'Pre-Release flavor - rc, beta, or anything. Pre-Releases are always patch releases.'
required: false
default: ''

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Setup Git
run: |
git config --global user.name "devx-sauce-bot"
git config --global user.email "[email protected]"
- name: Setup NPM
run: npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }}

- name: Pre-Release
if: ${{ github.event.inputs.preReleaseFlavor != '' }}
run: npm run release:ci -- --preRelease=${{ github.event.inputs.preReleaseFlavor }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release
if: ${{ github.event.inputs.preReleaseFlavor == '' }}
run: npm run release:ci -- ${{ github.event.inputs.releaseType }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
27 changes: 16 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
# Contributing to _projectname_
# Contributing

**Thank you for your interest in _projectname_. Your contributions are highly welcome.**
**Thank you for your interest. Your contributions are highly welcome.**

There are multiple ways of getting involved:

- [Report a bug](#report-a-bug)
- [Suggest a feature](#suggest-a-feature)
- [Contribute code](#contribute-code)
- [Report a bug](#report-a-bug)
- [Suggest a feature](#suggest-a-feature)
- [Contribute code](#contribute-code)

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

## Report a bug
## Report a bug

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.

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

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).

## Suggest a feature
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".

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".

## Contribute code

This is an outline of what the workflow for code contributions looks like

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

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

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

### Commit messages
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”.

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”.

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

### Sign your work / Developer certificate of origin

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)

```
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
We acknowledge that every line of code that we write may potentially contain security issues.
We are trying to deal with it responsibly and provide patches as quickly as possible.
We are trying to deal with it responsibly and provide patches as quickly as possible.

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

0 comments on commit 7a70692

Please sign in to comment.