|
1 | 1 | name: Publish |
| 2 | +# on: |
| 3 | +# release: |
| 4 | +# types: [published] |
2 | 5 | on: |
3 | | - release: |
4 | | - types: [published] |
| 6 | + push: |
5 | 7 |
|
6 | 8 | jobs: |
7 | 9 | publish: |
@@ -34,68 +36,76 @@ jobs: |
34 | 36 | run: npm run build |
35 | 37 | working-directory: xero-node |
36 | 38 |
|
37 | | - - name: Fetch Latest release number |
38 | | - id: get_latest_release_number |
| 39 | + - name: checking dist |
39 | 40 | run: | |
40 | | - latest_version=$(gh release view --json tagName --jq '.tagName') |
41 | | - echo "Latest release version is - $latest_version" |
42 | | - echo "::set-output name=release_tag::$latest_version" |
43 | | - working-directory: xero-node |
44 | | - env: |
45 | | - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
| 41 | + echo "checking current folders --" |
| 42 | + ls -al |
| 43 | + echo "viewing package json" |
| 44 | + cat package.json |
46 | 45 |
|
47 | | - - name: Publish to npm |
48 | | - env: |
49 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
50 | | - run: npm publish |
51 | | - working-directory: xero-node |
52 | 46 |
|
53 | | - notify-slack-on-success: |
54 | | - runs-on: ubuntu-latest |
55 | | - needs: publish |
56 | | - permissions: |
57 | | - contents: read |
58 | | - if: success() |
59 | | - steps: |
60 | | - - name: Checkout xero-node repo |
61 | | - uses: actions/checkout@v4 |
62 | | - with: |
63 | | - repository: XeroAPI/xero-node |
64 | | - path: xero-node |
| 47 | + # - name: Fetch Latest release number |
| 48 | + # id: get_latest_release_number |
| 49 | + # run: | |
| 50 | + # latest_version=$(gh release view --json tagName --jq '.tagName') |
| 51 | + # echo "Latest release version is - $latest_version" |
| 52 | + # echo "::set-output name=release_tag::$latest_version" |
| 53 | + # working-directory: xero-node |
| 54 | + # env: |
| 55 | + # GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
65 | 56 |
|
66 | | - - name: Send slack notification on success |
67 | | - uses: ./xero-node/.github/actions/notify-slack |
68 | | - with: |
69 | | - heading_text: "Publish job has succeeded !" |
70 | | - alert_type: "thumbsup" |
71 | | - job_status: "Success" |
72 | | - XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} |
73 | | - job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" |
74 | | - button_type: "primary" |
75 | | - package_version: ${{needs.publish.outputs.release_number}} |
76 | | - repo_link: ${{github.server_url}}/${{github.repository}} |
| 57 | + # - name: Publish to npm |
| 58 | + # env: |
| 59 | + # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 60 | + # run: npm publish |
| 61 | + # working-directory: xero-node |
77 | 62 |
|
78 | | - notify-slack-on-failure: |
79 | | - runs-on: ubuntu-latest |
80 | | - needs: publish |
81 | | - permissions: |
82 | | - contents: read |
83 | | - if: failure() |
84 | | - steps: |
85 | | - - name: Checkout xero-node repo |
86 | | - uses: actions/checkout@v4 |
87 | | - with: |
88 | | - repository: XeroAPI/xero-node |
89 | | - path: xero-node |
| 63 | + # notify-slack-on-success: |
| 64 | + # runs-on: ubuntu-latest |
| 65 | + # needs: publish |
| 66 | + # permissions: |
| 67 | + # contents: read |
| 68 | + # if: success() |
| 69 | + # steps: |
| 70 | + # - name: Checkout xero-node repo |
| 71 | + # uses: actions/checkout@v4 |
| 72 | + # with: |
| 73 | + # repository: XeroAPI/xero-node |
| 74 | + # path: xero-node |
90 | 75 |
|
91 | | - - name: Send slack notification on failure |
92 | | - uses: ./xero-node/.github/actions/notify-slack |
93 | | - with: |
94 | | - heading_text: "Publish job has failed !" |
95 | | - alert_type: "alert" |
96 | | - job_status: "Failed" |
97 | | - XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} |
98 | | - job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" |
99 | | - button_type: "danger" |
100 | | - package_version: ${{needs.publish.outputs.release_number}} |
101 | | - repo_link: ${{github.server_url}}/${{github.repository}} |
| 76 | + # - name: Send slack notification on success |
| 77 | + # uses: ./xero-node/.github/actions/notify-slack |
| 78 | + # with: |
| 79 | + # heading_text: "Publish job has succeeded !" |
| 80 | + # alert_type: "thumbsup" |
| 81 | + # job_status: "Success" |
| 82 | + # XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} |
| 83 | + # job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" |
| 84 | + # button_type: "primary" |
| 85 | + # package_version: ${{needs.publish.outputs.release_number}} |
| 86 | + # repo_link: ${{github.server_url}}/${{github.repository}} |
| 87 | + |
| 88 | + # notify-slack-on-failure: |
| 89 | + # runs-on: ubuntu-latest |
| 90 | + # needs: publish |
| 91 | + # permissions: |
| 92 | + # contents: read |
| 93 | + # if: failure() |
| 94 | + # steps: |
| 95 | + # - name: Checkout xero-node repo |
| 96 | + # uses: actions/checkout@v4 |
| 97 | + # with: |
| 98 | + # repository: XeroAPI/xero-node |
| 99 | + # path: xero-node |
| 100 | + |
| 101 | + # - name: Send slack notification on failure |
| 102 | + # uses: ./xero-node/.github/actions/notify-slack |
| 103 | + # with: |
| 104 | + # heading_text: "Publish job has failed !" |
| 105 | + # alert_type: "alert" |
| 106 | + # job_status: "Failed" |
| 107 | + # XERO_SLACK_WEBHOOK_URL: ${{secrets.XERO_SLACK_WEBHOOK_URL}} |
| 108 | + # job_url: "https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" |
| 109 | + # button_type: "danger" |
| 110 | + # package_version: ${{needs.publish.outputs.release_number}} |
| 111 | + # repo_link: ${{github.server_url}}/${{github.repository}} |
0 commit comments