-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove unneeded lines and lint
- Loading branch information
1 parent
26b7299
commit 4e8aa14
Showing
1 changed file
with
36 additions
and
77 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,83 +1,42 @@ | ||
name: Publish JavaScript Library | ||
name: Copy build to d2-ci | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
release: | ||
types: [published] | ||
push: | ||
branches-ignore: | ||
- master | ||
|
||
env: | ||
GIT_AUTHOR_NAME: '@dhis2-bot' | ||
GIT_AUTHOR_EMAIL: '[email protected]' | ||
GIT_COMMITTER_NAME: '@dhis2-bot' | ||
GIT_COMMITTER_EMAIL: '[email protected]' | ||
NPM_TOKEN: ${{secrets.DHIS2_BOT_NPM_TOKEN}} | ||
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}} | ||
GIT_AUTHOR_NAME: '@dhis2-bot' | ||
GIT_AUTHOR_EMAIL: '[email protected]' | ||
GIT_COMMITTER_NAME: '@dhis2-bot' | ||
GIT_COMMITTER_EMAIL: '[email protected]' | ||
NPM_TOKEN: ${{secrets.DHIS2_BOT_NPM_TOKEN}} | ||
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}} | ||
|
||
jobs: | ||
publish-to-github: | ||
runs-on: ubuntu-latest | ||
if: contains(github.ref, 'alpha') | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{env.GH_TOKEN}} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: npm install --frozen-lockfile | ||
|
||
- name: Build package | ||
run: yarn build | ||
|
||
- name: Pack and unpack the build | ||
run: yarn pack --filename output.tgz && tar -xzf output.tgz | ||
|
||
- name: Copy package to d2-ci | ||
uses: dhis2/deploy-build@master | ||
with: | ||
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} | ||
|
||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_CONFIG_REGISTRY: https://npm.pkg.github.com/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
publish-to-npm: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build package | ||
run: npm run build | ||
|
||
- name: Publish to npm | ||
run: npm publish --registry=https://registry.npmjs.org | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
copy-to-d2-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{env.GH_TOKEN}} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: npm install --frozen-lockfile | ||
|
||
- name: Build package | ||
run: yarn build | ||
|
||
- name: Pack and unpack the build | ||
run: yarn pack --filename output.tgz && tar -xzf output.tgz | ||
|
||
- name: Copy package to d2-ci | ||
uses: dhis2/deploy-build@master | ||
with: | ||
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }} |