|
1 | 1 | # github workflow to make a release |
2 | 2 | name: Create release based on a tag |
3 | 3 | on: |
4 | | - push: |
5 | | - tags: |
6 | | - - 'v*' # Trigger when a tag like v1.0.0 is pushed |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' # Trigger when a tag like v1.0.0 is pushed |
7 | 7 | permissions: |
8 | | - contents: write # Grants write permission to repository contents |
| 8 | + contents: write # Grants write permission to repository contents |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - release: |
12 | | - name: Release pushed tag |
13 | | - runs-on: ubuntu-latest |
14 | | - strategy: |
15 | | - matrix: |
16 | | - node-version: [20] |
17 | | - |
18 | | - steps: |
19 | | - - name: Checkout |
20 | | - uses: actions/checkout@v4 |
21 | | - - name: Set up Node ${{ matrix.node-version }} |
22 | | - uses: actions/setup-node@v4 |
23 | | - with: |
24 | | - node-version: ${{ matrix.node-version }} |
25 | | - cache: 'npm' |
26 | | - - name: Install dependencies |
27 | | - run: npm install |
28 | | - - name: test |
29 | | - run: npm run test |
30 | | - - name: Build |
31 | | - run: npm run build |
32 | | - env: |
33 | | - GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} |
34 | | - GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} |
35 | | - GOOGLE_DEVELOPER_KEY: ${{ secrets.GOOGLE_DEVELOPER_KEY }} |
36 | | - GOOGLE_REDIRECT_URI: ${{ vars.GOOGLE_REDIRECT_URI }} |
37 | | - - name: Archive site content |
38 | | - uses: thedoctor0/zip-release@master |
39 | | - with: |
40 | | - type: 'tar' |
41 | | - directory: './dist' |
42 | | - filename: ../xrpweb-v${{ github.run_number }}.zip |
43 | | - - name: Debug - List files |
44 | | - run: | |
45 | | - ls -la |
46 | | - ls -la dist/ |
47 | | - - name: Create Release |
48 | | - id: create_new_release |
49 | | - uses: softprops/action-gh-release@v2.3.3 |
50 | | - with: |
51 | | - tag_name: ${{ github.ref_name }} |
52 | | - name: Release ${{ github.ref_name }} |
53 | | - env: |
54 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
55 | | - - name: Upload Build artifacts |
56 | | - uses: svenstaro/upload-release-action@v2 |
57 | | - with: |
58 | | - repo_token: ${{ secrets.GITHUB_TOKEN }} |
59 | | - file: xrpweb-v${{ github.run_number }}.zip |
60 | | - asset_name: artifacts.zip |
61 | | - tag: ${{ github.ref }} |
62 | | - overwrite: true |
| 11 | + release: |
| 12 | + name: Release pushed tag |
| 13 | + runs-on: ubuntu-latest |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + node-version: [20] |
| 17 | + |
| 18 | + steps: |
| 19 | + - name: Checkout |
| 20 | + uses: actions/checkout@v4 |
| 21 | + - name: Set up Node ${{ matrix.node-version }} |
| 22 | + uses: actions/setup-node@v4 |
| 23 | + with: |
| 24 | + node-version: ${{ matrix.node-version }} |
| 25 | + cache: 'npm' |
| 26 | + - name: Install dependencies |
| 27 | + run: npm install |
| 28 | + - name: test |
| 29 | + run: npm run test |
| 30 | + - name: Build |
| 31 | + run: npm run build |
| 32 | + env: |
| 33 | + GOOGLE_AUTH_URL: ${{ vars.GOOGLE_AUTH_URL }} |
| 34 | + GOOGLE_CHATAPI_PROXY_TARGET: ${{ vars.GOOGLE_CHATAPI_PROXY_TARGET }} |
| 35 | + GOOGLE_REDIRECT_URI: ${{ vars.GOOGLE_REDIRECT_URI }} |
| 36 | + - name: Archive site content |
| 37 | + uses: thedoctor0/zip-release@master |
| 38 | + with: |
| 39 | + type: 'tar' |
| 40 | + directory: './dist' |
| 41 | + filename: ../xrpweb-v${{ github.run_number }}.zip |
| 42 | + - name: Debug - List files |
| 43 | + run: | |
| 44 | + ls -la |
| 45 | + ls -la dist/ |
| 46 | + - name: Create Release |
| 47 | + id: create_new_release |
| 48 | + uses: softprops/action-gh-release@v2.3.3 |
| 49 | + with: |
| 50 | + tag_name: ${{ github.ref_name }} |
| 51 | + name: Release ${{ github.ref_name }} |
| 52 | + env: |
| 53 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 54 | + - name: Upload Build artifacts |
| 55 | + uses: svenstaro/upload-release-action@v2 |
| 56 | + with: |
| 57 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + file: xrpweb-v${{ github.run_number }}.zip |
| 59 | + asset_name: artifacts.zip |
| 60 | + tag: ${{ github.ref }} |
| 61 | + overwrite: true |
0 commit comments