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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 575 - (hide annotations)
Mon Jul 29 17:59:26 2024 UTC (8 months ago) by rakinar2
File size: 4211 byte(s)
chore: add trunk
1 rakinar2 575 name: Releases
2     on:
3     push:
4     branches:
5     - main
6    
7     jobs:
8     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'
68     runs-on: ubuntu-latest
69    
70     steps:
71     - uses: actions/checkout@v3
72    
73     - name: Prepare Git
74     run: |
75     echo "${{ secrets.COMMIT_GPG_KEY }}" > private.key
76     gpg --import private.key
77     rm -f private.key
78     git config --global user.signingkey "6AE7B08C68169452"
79     git config --global commit.gpgsign true
80    
81     - 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]
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
125     id: create_release
126     uses: ncipollo/release-action@v1
127     if: ${{ steps.changelog.outputs.skipped == 'false' }}
128     env:
129     GITHUB_TOKEN: ${{ secrets.__TOKEN }}
130     with:
131     tag: ${{ steps.changelog.outputs.tag }}
132     name: ${{ steps.changelog.outputs.tag }}
133     body: ${{ steps.changelog.outputs.clean_changelog }}
134     artifactContentType: application/x-gzip
135     artifacts: ./sudobot-release-linux.tar.gz,./sudobot-release-darwin.tar.gz

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26