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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 608 - (hide annotations)
Wed Aug 21 03:56:33 2024 UTC (7 months, 1 week ago) by rakinar2
File size: 4267 byte(s)
ci(releases): fix release workflow not creating dist packages with build directory
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 rakinar2 608 mkdir sudobot-release-${OS};
53     mv build sudobot-release-${OS};
54 rakinar2 575 mv src sudobot-release-${OS};
55 rakinar2 608 mkdir sudobot-release-${OS}/lib;
56     mv lib/build sudobot-release-${OS}/lib/build;
57 rakinar2 575 tar -cvzf sudobot-release-${OS}-incomplete.tar.gz sudobot-release-${OS};
58    
59     - name: Upload Release Artifacts
60     uses: actions/upload-artifact@v3
61     with:
62     name: sudobot-release-${{ matrix.os }}-incomplete
63     path: |
64     ./sudobot-release-${{ matrix.os }}-incomplete.tar.gz
65    
66     release:
67     needs: [build]
68     if: github.repository_owner == 'onesoft-sudo'
69     runs-on: ubuntu-latest
70    
71     steps:
72     - uses: actions/checkout@v3
73    
74     - name: Prepare Git
75     run: |
76     echo "${{ secrets.COMMIT_GPG_KEY }}" > private.key
77     gpg --import private.key
78     rm -f private.key
79     git config --global user.signingkey "6AE7B08C68169452"
80     git config --global commit.gpgsign true
81    
82     - name: Conventional Changelog Action
83     id: changelog
84     uses: TriPSs/conventional-changelog-action@v5
85     with:
86     github-token: ${{ secrets.__TOKEN }}
87     version-file: "./package.json"
88     git-user-name: "Conventional Changelog Action"
89     git-user-email: [email protected]
90     git-message: |
91     release: {version} [skip ci]
92    
93     Signed-off-by: Ar Rakin <[email protected]>
94    
95     - name: Download Linux Release Artifact
96     uses: actions/download-artifact@v2
97     with:
98     name: sudobot-release-ubuntu-latest-incomplete
99    
100     - name: Download macOS Release Artifact
101     uses: actions/download-artifact@v2
102     with:
103     name: sudobot-release-macos-latest-incomplete
104    
105     - name: Extract Artifacts
106     run: |
107     tar -xvzf sudobot-release-ubuntu-latest-incomplete.tar.gz;
108     tar -xvzf sudobot-release-macos-latest-incomplete.tar.gz;
109    
110     - name: Rename Artifacts
111     run: |
112     mv sudobot-release-ubuntu-latest sudobot-release-linux;
113     mv sudobot-release-macos-latest sudobot-release-darwin;
114    
115     - name: Add package.json to Incomplete Artifacts
116     run: |
117     cp package.json sudobot-release-linux/package.json;
118     cp package.json sudobot-release-darwin/package.json;
119    
120     - name: Re-package Artifacts
121     run: |
122     tar -cvzf sudobot-release-linux.tar.gz sudobot-release-linux;
123     tar -cvzf sudobot-release-darwin.tar.gz sudobot-release-darwin;
124    
125     - name: Create Release
126     id: create_release
127     uses: ncipollo/release-action@v1
128     if: ${{ steps.changelog.outputs.skipped == 'false' }}
129     env:
130     GITHUB_TOKEN: ${{ secrets.__TOKEN }}
131     with:
132     tag: ${{ steps.changelog.outputs.tag }}
133     name: ${{ steps.changelog.outputs.tag }}
134     body: ${{ steps.changelog.outputs.clean_changelog }}
135     artifactContentType: application/x-gzip
136     artifacts: ./sudobot-release-linux.tar.gz,./sudobot-release-darwin.tar.gz

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26