diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml new file mode 100644 index 0000000..221f744 --- /dev/null +++ b/.github/workflows/deployment.yml @@ -0,0 +1,36 @@ +name: Deployment + +on: + push: + branches: [master] + +jobs: + deployment: + name: Release new version + if: github.repository_owner == 'klarna-incubator' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + - name: Install dependencies + run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts + - name: Publish to NPM + id: publish + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_PUBLISH_TOKEN }} + - name: Create release + if: steps.publish.outputs.type != 'none' + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ steps.publish.outputs.version }} + release_name: ${{ steps.publish.outputs.version }} + body: ${{ steps.publish.outputs.version }} + draft: true + prerelease: false diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6b5e507..a620f13 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Use Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '16' - name: Install dependencies diff --git a/README.md b/README.md index 203234e..1057d80 100644 --- a/README.md +++ b/README.md @@ -38,26 +38,26 @@ The first time you run the command it will prompt you which platforms you want t ```js // platform-colors.config.js module.exports = { - "colors": { - "background": { - "light": "#ffffff", - "dark": "#000000" + colors: { + background: { + light: '#ffffff', + dark: '#000000', }, - "accent": "pink" + accent: 'pink', }, - "javascript": { - "typescript": true, - "outputDirectory": "src/colors/" + javascript: { + typescript: true, + outputDirectory: 'src/colors/', + }, + ios: { + outputDirectory: 'ios/YourApp/Images.xcassets/', }, - "ios": { - "outputDirectory": "ios/YourApp/Images.xcassets/" + android: { + outputDirectory: 'android/app/src/main/res/', }, - "android": { - "outputDirectory": "android/app/src/main/res/" + css: { + outputDirectory: 'static/css/', }, - "css": { - "outputDirectory": "static/css/" - } }; ``` @@ -105,6 +105,7 @@ Example: An object containing `outputDirectory` which should be an Android `res` directory. Example: + ```js { android: { @@ -206,6 +207,10 @@ yarn android See our [changelog](CHANGELOG.md). +## Deployment + +Update version in `package.json` and merge to master. This will publish the package to NPM, create a draft release on GitHub and a version tag. Edit the release with additional information and publish it. + Copyright © 2021 Klarna Bank AB For license details, see the [LICENSE](LICENSE) file in the root of this project.