Skip to content

Commit

Permalink
Added contributing.md
Browse files Browse the repository at this point in the history
Removed publish to GHP
  • Loading branch information
willemliufdmg committed Dec 16, 2021
1 parent 5681fd8 commit ca3a107
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 22 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,3 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
continue-on-error: true
- name: Use Node.js (GitHub) ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
always-auth: true
registry-url: 'https://npm.pkg.github.com'
scope: '@FDMediagroep'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish GPR
if: contains(github.ref, 'canary') == false
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: Publish GPR (canary)
if: contains(github.ref, 'canary')
run: npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true

46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing

How nice of you to swing by!
This must mean that you're serious about thinking to contribute to our little OSS project.
Let's get acquainted by allowing us to show you how we contribute to this project ourselves.
By following these tips and guidelines you'll find that you can contribute more easily.

## Release tagging

Tagging the repository on GitHub with a release will automatically start the GitHub Actions. It currently consists of 2 workflows:

- build
- release

After the build has completed the release will be run which does the actual packaging of the Component Library and publishes it to both NPMJS and GitHub Packages.

Versioning convention:

`v{major}.{minor}.{patch}[-canary.{patch}]`

Examples:

- v0.3.5
- v1.2.2
- v1.2.3
- v1.2.3-canary.1

Canary releases are pre-releases. So version `v1.2.3-canary.1` is considered as an older release than `v1.2.3`. Canary releases are useful if you want to test it in your own application without risking other users installing it by mistake.

With NPM a developer typically installs node modules like so:

`npm i @fdmg/imgix-upload`

or

`npm i @fdmg/imgix-upload@latest`

Let's say we haven't released `v1.2.3` yet then both these commands would automatically install `v1.2.2` and not `v1.2.3-canary.1`. Even though the latter has been packaged and released later than `v1.2.2`.

In order to install `v1.2.3-canary.1` the developer could use the following commands:

`npm i @fdmg/[email protected]`

or

`npm i @fdmg/imgix-upload@next`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fdmg-imgix-upload",
"name": "@fdmg/imgix-upload",
"version": "0.0.1",
"description": "Command-line tool to upload images to the FDMG IMGIX S3 Bucket",
"main": "dist/app.js",
Expand Down

0 comments on commit ca3a107

Please sign in to comment.