|
1 | | -name: "Create Tagged Release" |
| 1 | +name: 'Create Tagged Release' |
2 | 2 |
|
3 | 3 | on: |
4 | | - workflow_dispatch: |
5 | | - inputs: |
6 | | - release_version: |
7 | | - description: 'Version number of the release' |
8 | | - required: true |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + release_version: |
| 7 | + description: 'Version number of the release' |
| 8 | + required: true |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - gh_tagged_release: |
12 | | - name: Create tagged release |
13 | | - runs-on: ubuntu-latest |
| 11 | + gh_tagged_release: |
| 12 | + name: Create tagged release |
| 13 | + runs-on: ubuntu-latest |
14 | 14 |
|
15 | | - steps: |
16 | | - - name: Checkout project |
17 | | - uses: actions/checkout@v3 |
| 15 | + steps: |
| 16 | + - name: Checkout project |
| 17 | + uses: actions/checkout@v3 |
18 | 18 |
|
19 | | - - name: Setup Git |
20 | | - run: | |
21 | | - git config user.name github-actions |
22 | | - git config user.email github-actions@github.com |
| 19 | + - name: Setup Git |
| 20 | + run: | |
| 21 | + git config user.name github-actions |
| 22 | + git config user.email github-actions@github.com |
23 | 23 |
|
24 | | - - name: Cache node modules |
25 | | - uses: actions/cache@v3 |
26 | | - env: |
27 | | - cache-name: cache-node-modules |
28 | | - with: |
29 | | - path: ~/.npm |
30 | | - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} |
31 | | - restore-keys: | |
32 | | - ${{ runner.os }}-${{ env.cache-name }}- |
33 | | - ${{ runner.os }}- |
| 24 | + - name: Cache node modules |
| 25 | + uses: actions/cache@v3 |
| 26 | + env: |
| 27 | + cache-name: cache-node-modules |
| 28 | + with: |
| 29 | + path: ~/.npm |
| 30 | + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} |
| 31 | + restore-keys: | |
| 32 | + ${{ runner.os }}-${{ env.cache-name }}- |
| 33 | + ${{ runner.os }}- |
34 | 34 |
|
35 | | - - name: Setup NodeJs |
36 | | - uses: actions/setup-node@v3 |
37 | | - with: |
38 | | - node-version: '17' |
39 | | - cache: 'npm' |
40 | | - cache-dependency-path: '**/package-lock.json' |
| 35 | + - name: Setup NodeJs |
| 36 | + uses: actions/setup-node@v3 |
| 37 | + with: |
| 38 | + node-version: '18' |
| 39 | + cache: 'npm' |
| 40 | + cache-dependency-path: '**/package-lock.json' |
41 | 41 |
|
42 | | - - name: Set versions |
43 | | - run: | |
44 | | - release_version=${{ github.event.inputs.release_version }} |
45 | | - release_branch_name=${release_version%.*}.x |
46 | | - echo "release_branch_name=$release_branch_name" >> $GITHUB_ENV |
| 42 | + - name: Set versions |
| 43 | + run: | |
| 44 | + release_version=${{ github.event.inputs.release_version }} |
| 45 | + release_branch_name=${release_version%.*}.x |
| 46 | + echo "release_branch_name=$release_branch_name" >> $GITHUB_ENV |
47 | 47 |
|
48 | | - - name: Set antora version |
49 | | - run: yq eval -i '.version = "${{ github.event.inputs.release_version }}"' documentation/js-sdk-aml-guide/antora.yml |
| 48 | + - name: Set antora version |
| 49 | + run: yq eval -i '.version = "${{ github.event.inputs.release_version }}"' documentation/js-sdk-aml-guide/antora.yml |
50 | 50 |
|
51 | | - - name: Commit version changes and push to upstream repository |
52 | | - uses: stefanzweifel/git-auto-commit-action@v4 |
53 | | - with: |
54 | | - branch: ${{ env.release_branch_name }} |
55 | | - commit_user_name: github-actions |
56 | | - commit_user_email: github-actions@github.com |
57 | | - commit_author: Author <actions@github.com> |
58 | | - file_pattern: 'documentation/js-sdk-aml-guide/antora.yml' |
| 51 | + - name: Commit version changes and push to upstream repository |
| 52 | + uses: stefanzweifel/git-auto-commit-action@v4 |
| 53 | + with: |
| 54 | + branch: ${{ env.release_branch_name }} |
| 55 | + commit_user_name: github-actions |
| 56 | + commit_user_email: github-actions@github.com |
| 57 | + commit_author: Author <actions@github.com> |
| 58 | + file_pattern: 'documentation/js-sdk-aml-guide/antora.yml' |
59 | 59 |
|
60 | | - - name: Install Dependencies |
61 | | - run: npm install |
| 60 | + - name: Install Dependencies |
| 61 | + run: npm install |
62 | 62 |
|
63 | | - - name: Set app version (Unix) |
64 | | - run: npm version ${{ github.event.inputs.release_version }} --no-git-tag-version |
| 63 | + - name: Set app version (Unix) |
| 64 | + run: npm version ${{ github.event.inputs.release_version }} --no-git-tag-version |
65 | 65 |
|
66 | | - - name: Build Project |
67 | | - run: npm run build |
| 66 | + - name: Build Project |
| 67 | + run: npm run build |
68 | 68 |
|
69 | | - # This should be removed as soon as we go towards nodejs package repository |
70 | | - - name: Pack Project as tgz |
71 | | - run: npm pack |
| 69 | + # This should be removed as soon as we go towards nodejs package repository |
| 70 | + - name: Pack Project as tgz |
| 71 | + run: npm pack |
72 | 72 |
|
73 | | - - name: "Create Github release (full)" |
74 | | - if: ${{ !contains( github.event.inputs.release_version, '-rc' ) }} |
75 | | - uses: softprops/action-gh-release@v1 |
76 | | - id: esmf_sdk_js_aml_release |
77 | | - with: |
78 | | - body: "Release version ${{ github.event.inputs.release_version }}." |
79 | | - tag_name: v${{ github.event.inputs.release_version }} |
80 | | - target_commitish: ${{ env.release_branch_name }} |
81 | | - draft: false |
82 | | - prerelease: false |
83 | | - files: esmf-aspect-model-loader-${{ github.event.inputs.release_version }}.tgz |
84 | | - env: |
85 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 73 | + - name: 'Create Github release (full)' |
| 74 | + if: ${{ !contains( github.event.inputs.release_version, '-rc' ) }} |
| 75 | + uses: softprops/action-gh-release@v1 |
| 76 | + id: esmf_sdk_js_aml_release |
| 77 | + with: |
| 78 | + body: 'Release version ${{ github.event.inputs.release_version }}.' |
| 79 | + tag_name: v${{ github.event.inputs.release_version }} |
| 80 | + target_commitish: ${{ env.release_branch_name }} |
| 81 | + draft: false |
| 82 | + prerelease: false |
| 83 | + files: esmf-aspect-model-loader-${{ github.event.inputs.release_version }}.tgz |
| 84 | + env: |
| 85 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
86 | 86 |
|
87 | | - - name: "Create Github release (milestone)" |
88 | | - if: contains( github.event.inputs.release_version, '-rc' ) |
89 | | - uses: softprops/action-gh-release@v1 |
90 | | - id: sds_sdk_js_aml_release |
91 | | - with: |
92 | | - body: "Release version ${{ github.event.inputs.release_version }}." |
93 | | - tag_name: v${{ github.event.inputs.release_version }} |
94 | | - target_commitish: ${{ env.release_branch_name }} |
95 | | - draft: false |
96 | | - prerelease: true |
97 | | - files: esmf-aspect-model-loader-${{ github.event.inputs.release_version }}.tgz |
98 | | - env: |
99 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 87 | + - name: 'Create Github release (milestone)' |
| 88 | + if: contains( github.event.inputs.release_version, '-rc' ) |
| 89 | + uses: softprops/action-gh-release@v1 |
| 90 | + id: sds_sdk_js_aml_release |
| 91 | + with: |
| 92 | + body: 'Release version ${{ github.event.inputs.release_version }}.' |
| 93 | + tag_name: v${{ github.event.inputs.release_version }} |
| 94 | + target_commitish: ${{ env.release_branch_name }} |
| 95 | + draft: false |
| 96 | + prerelease: true |
| 97 | + files: esmf-aspect-model-loader-${{ github.event.inputs.release_version }}.tgz |
| 98 | + env: |
| 99 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments