-
Notifications
You must be signed in to change notification settings - Fork 2
Add github actions #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7793053
Add github actions
jimmycallin 5877fff
Update documentation to reference Github instead of Bitbucket
jimmycallin 7e64864
Updated documentation
jimmycallin f2e074c
Add CODEOWNERS file
jimmycallin a0f89d1
Apply suggestions from code review
jimmycallin e0d2cb5
set up dependency caching
jimmycallin a1c58a5
update CONTRIBUTING
jimmycallin bd7afd4
typo
jimmycallin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
# This workflow will do a clean installation of node dependencies, build the source code and run tests | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Using Node.js from .nvmrc | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
|
||
# caching with actions/setup-node isn't supported with yarn 3 | ||
# so we use this workaround https://github.com/actions/setup-node/issues/488 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
shell: bash | ||
- name: Restore yarn cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }} | ||
restore-keys: | | ||
yarn-cache-folder- | ||
|
||
- run: yarn install --immutable | ||
- run: yarn build | ||
- run: yarn test |
This file contains hidden or 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,43 @@ | ||
# This workflow will run tests using node and then publish a package to NPM when a release is created | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
|
||
name: Publish to NPM | ||
|
||
on: | ||
release: | ||
# Run this on both stable and pre-release | ||
types: [published] | ||
|
||
jobs: | ||
publish-npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# Check out the referred tag in the release | ||
# In case we want to publish something other than HEAD | ||
ref: $GITHUB_SHA | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
registry-url: https://registry.npmjs.org/ | ||
scope: "@ftrack" | ||
|
||
# caching with actions/setup-node isn't supported with yarn 3 | ||
# so we use this workaround https://github.com/actions/setup-node/issues/488 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
shell: bash | ||
- name: Restore yarn cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }} | ||
restore-keys: | | ||
yarn-cache-folder- | ||
|
||
- run: yarn install --immutable | ||
- run: yarn npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
This file contains hidden or 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 hidden or 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,5 @@ | ||
# Reference | ||
|
||
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
|
||
* @ftrackhq/frontend |
This file contains hidden or 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,30 @@ | ||
# Contributing to @ftrack/api | ||
|
||
Thank you for wanting to contribute to our JavaScript API! | ||
|
||
Please clone this repository, and follow these instructions to make sure you are in a clean spot before coding: | ||
|
||
Using node version as reflected in `.nvmrc`, run: | ||
|
||
- yarn install | ||
- yarn test | ||
|
||
If the tests passes, you should be good to go. Please submit a PR with your changes and we will look at them as soon as possible. | ||
|
||
## Publishing a release | ||
|
||
_This is only relevant for ftrack employees when preparing and publishing a new release._ | ||
|
||
To publish a new release, follow these steps: | ||
|
||
Locally: | ||
|
||
- `git switch -c release/<new-release-tag>` | ||
- `npm version <new-release-tag>` | ||
- `git push --follow-tags` | ||
|
||
On Github: | ||
|
||
- Create a new PR from your branch, and get someone to approve it, then merge. | ||
- [Create a new release](https://github.com/ftrackhq/javascript-api/releases/new), pointing to your tag. Generate new release notes based on commit history and clean it up a bit. Choose whether or not it should be a pre-release (your tag should reflect this by appending a beta tag, e.g. `1.0.0-beta.1`) | ||
- Click publish, and make sure the Github action passes. Then you should see a new release on [NPM](https://www.npmjs.com/package/@ftrack/api). |
File renamed without changes.
This file contains hidden or 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,16 @@ | ||
# ftrack Javascript API | ||
|
||
Javascript API for ftrack | ||
|
||
## Documentation | ||
|
||
Full documentation, including installation and setup guides, can be found at | ||
http://ftrack-javascript-api.rtd.ftrack.com/en/stable/ | ||
|
||
## Contributing | ||
|
||
See [CONTRIBUTING](https://github.com/ftrackhq/javascript-api/blob/main/CONTRIBUTING.md) | ||
|
||
## Licence | ||
|
||
See [LICENCE](https://github.com/ftrackhq/javascript-api/blob/main/LICENSE.txt) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.