/[sudobot]/trunk/.github/workflows/release.yml
ViewVC logotype

Diff of /trunk/.github/workflows/release.yml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 571 by rakin, Mon Jul 29 17:30:53 2024 UTC revision 572 by rakinar2, Mon Jul 29 17:51:37 2024 UTC
# Line 5  on: Line 5  on:
5        - main        - main
6    
7  jobs:  jobs:
8    changelog:    build:
9        if: github.repository_owner == 'onesoft-sudo'
10    
11        strategy:
12          matrix:
13            os: [ubuntu-latest, macos-latest]
14    
15        runs-on: ${{ matrix.os }}
16    
17        steps:
18          - uses: actions/checkout@v3
19    
20          - name: Use Node.js 21.x
21            uses: actions/setup-node@v3
22            with:
23              node-version: 21.x
24    
25          - name: Install Programs, Libraries and Tools (Linux)
26            run: |
27              sudo apt update;
28              sudo apt install build-essential libcurl4 libcurl4-gnutls-dev -y;
29            if: matrix.os == 'ubuntu-latest'
30    
31          - name: Install Programs, Libraries and Tools (macOS)
32            run: brew install curl pkg-config cairo pango libpng jpeg giflib librsvg
33            if: matrix.os == 'macos-latest'
34    
35          - name: "Install Native Libraries"
36            run: |
37              git clone https://github.com/Cogmasters/concord;
38              cd concord;
39              make;
40              sudo make install;
41              cd ..;
42    
43          - name: "Build Native Libraries with GNU Make"
44            run: make
45    
46          - name: "Build with BlazeBuild"
47            run: ./blazew build
48    
49          - name: "Package the build output files"
50            run: |
51              OS="${{ matrix.os }}";
52              mkdir -p sudobot-release-${OS}/lib;
53              mv build sudobot;
54              mv src sudobot-release-${OS};
55              mv lib/build sudobot-release-${OS}/lib;
56              tar -cvzf sudobot-release-${OS}-incomplete.tar.gz sudobot-release-${OS};
57    
58          - name: Upload Release Artifacts
59            uses: actions/upload-artifact@v3
60            with:
61              name: sudobot-release-${{ matrix.os }}-incomplete
62              path: |
63                ./sudobot-release-${{ matrix.os }}-incomplete.tar.gz
64    
65      release:
66        needs: [build]
67      if: github.repository_owner == 'onesoft-sudo'      if: github.repository_owner == 'onesoft-sudo'
68      runs-on: ubuntu-latest      runs-on: ubuntu-latest
69    
70      steps:      steps:
71        - uses: actions/checkout@v3        - uses: actions/checkout@v3
72    
73        - name: Conventional Release Action        - name: Prepare Git
74          id: release          run: |
75          uses: TriPSs/[email protected]            echo "${{ secrets.COMMIT_GPG_KEY }}" > private.key
76          with:            gpg --import private.key
77            github-token: ${{ secrets.AUTO_RELEASE_TOKEN }}            rm -f private.key
78            version-file: './package.json,./package-lock.json'            git config --global user.signingkey "6AE7B08C68169452"
79            output-file: './CHANGELOG.md'            git config --global commit.gpgsign true
80            release-count: 0  
81            git-user-name: "Conventional Release Action"        - name: Conventional Changelog Action
82            id: changelog
83            uses: TriPSs/conventional-changelog-action@v5
84            with:
85              github-token: ${{ secrets.__TOKEN }}
86              version-file: "./package.json"
87              git-user-name: "Conventional Changelog Action"
88            git-user-email: [email protected]            git-user-email: [email protected]
89              git-message: |
90                release: {version} [skip ci]
91    
92                Signed-off-by: Ar Rakin <[email protected]>
93    
94          - name: Download Linux Release Artifact
95            uses: actions/download-artifact@v2
96            with:
97              name: sudobot-release-ubuntu-latest-incomplete
98    
99          - name: Download macOS Release Artifact
100            uses: actions/download-artifact@v2
101            with:
102              name: sudobot-release-macos-latest-incomplete
103    
104          - name: Extract Artifacts
105            run: |
106              tar -xvzf sudobot-release-ubuntu-latest-incomplete.tar.gz;
107              tar -xvzf sudobot-release-macos-latest-incomplete.tar.gz;
108    
109          - name: Rename Artifacts
110            run: |
111              mv sudobot-release-ubuntu-latest sudobot-release-linux;
112              mv sudobot-release-macos-latest sudobot-release-darwin;
113    
114          - name: Add package.json to Incomplete Artifacts
115            run: |
116              cp package.json sudobot-release-linux/package.json;
117              cp package.json sudobot-release-darwin/package.json;
118    
119          - name: Re-package Artifacts
120            run: |
121              tar -cvzf sudobot-release-linux.tar.gz sudobot-release-linux;
122              tar -cvzf sudobot-release-darwin.tar.gz sudobot-release-darwin;
123    
124        - name: Create Release        - name: Create Release
125          uses: actions/create-release@v1          id: create_release
126            uses: ncipollo/release-action@v1
127          if: ${{ steps.changelog.outputs.skipped == 'false' }}          if: ${{ steps.changelog.outputs.skipped == 'false' }}
128          env:          env:
129            GITHUB_TOKEN: ${{ secrets.AUTO_RELEASE_TOKEN }}            GITHUB_TOKEN: ${{ secrets.__TOKEN }}
130          with:          with:
131            tag_name: ${{ steps.changelog.outputs.tag }}            tag: ${{ steps.changelog.outputs.tag }}
132            release_name: ${{ steps.changelog.outputs.tag }}            name: ${{ steps.changelog.outputs.tag }}
133            body: ${{ steps.changelog.outputs.clean_changelog }}            body: ${{ steps.changelog.outputs.clean_changelog }}
134              artifactContentType: application/x-gzip
135              artifacts: ./sudobot-release-linux.tar.gz,./sudobot-release-darwin.tar.gz

Legend:
Removed from v.571  
changed lines
  Added in v.572

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26