@@ -27,58 +27,58 @@ jobs:
2727
2828 runs-on : ${{ matrix.platform.os }}
2929 steps :
30- - uses : actions/checkout@v3
31-
32- - name : setup node
33- uses : actions/setup-node@v3
34- with :
35- node-version : 18
36- cache : ' npm'
37-
38- - name : ' Setup Rust'
39- if : matrix.platform.rust_target == 'aarch64-apple-darwin'
40- run : rustup target add aarch64-apple-darwin
41-
42- - uses : Swatinem/rust-cache@v2
43- with :
44- shared-key : ${{ matrix.platform.rust_target }}
45- workspaces : |
46- src-tauri
47-
48- - name : install dependencies (ubuntu only)
49- if : matrix.platform.os == 'ubuntu-latest'
50- run : |
51- sudo apt-get update
52- sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf libasound2-dev
53-
54- - name : install npm packages
55- run : npm ci
56-
57- - uses : qu1ck/action-tauri-build@5c69c9fdbb4231a738b4a668a2caddf6af45eab8
58- id : tauri_build
59- with :
60- target : ${{ matrix.platform.rust_target }}
61-
62- # The artifacts output can now be used to upload the artifacts
63- - uses : actions/upload-artifact@v3
64- with :
65- name : ${{ matrix.platform.rust_target }}
66- path : " ${{ join(fromJSON(steps.tauri_build.outputs.artifacts), '\n ') }}"
67-
68- - name : pack webapp
69- if : matrix.platform.os == 'ubuntu-latest'
70- working-directory : dist
71- id : pack-webapp
72- run : |
73- GIT_VERSION=`git describe --tags --always`
74- zip "trguing-web-$GIT_VERSION.zip" ./* -x create\* -x \*.map
75- echo "ZIPFILE=trguing-web-$GIT_VERSION.zip" >> $GITHUB_OUTPUT
76-
77- - uses : actions/upload-artifact@v3
78- if : matrix.platform.os == 'ubuntu-latest'
79- with :
80- name : build web
81- path : " dist/${{ steps.pack-webapp.outputs.ZIPFILE }}"
30+ - uses : actions/checkout@v3
31+
32+ - name : setup node
33+ uses : actions/setup-node@v3
34+ with :
35+ node-version : 18
36+ cache : ' npm'
37+
38+ - name : ' Setup Rust'
39+ if : matrix.platform.rust_target == 'aarch64-apple-darwin'
40+ run : rustup target add aarch64-apple-darwin
41+
42+ - uses : Swatinem/rust-cache@v2
43+ with :
44+ shared-key : ${{ matrix.platform.rust_target }}
45+ workspaces : |
46+ src-tauri
47+
48+ - name : install dependencies (ubuntu only)
49+ if : matrix.platform.os == 'ubuntu-latest'
50+ run : |
51+ sudo apt-get update
52+ sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf libasound2-dev
53+
54+ - name : install npm packages
55+ run : npm ci
56+
57+ - uses : qu1ck/action-tauri-build@5c69c9fdbb4231a738b4a668a2caddf6af45eab8
58+ id : tauri_build
59+ with :
60+ target : ${{ matrix.platform.rust_target }}
61+
62+ # The artifacts output can now be used to upload the artifacts
63+ - uses : actions/upload-artifact@v3
64+ with :
65+ name : ${{ matrix.platform.rust_target }}
66+ path : " ${{ join(fromJSON(steps.tauri_build.outputs.artifacts), '\n ') }}"
67+
68+ - name : pack webapp
69+ if : matrix.platform.os == 'ubuntu-latest'
70+ working-directory : dist
71+ id : pack-webapp
72+ run : |
73+ GIT_VERSION=`git describe --tags --always`
74+ zip "trguing-web-$GIT_VERSION.zip" ./* -x create\* -x \*.map
75+ echo "ZIPFILE=trguing-web-$GIT_VERSION.zip" >> $GITHUB_OUTPUT
76+
77+ - uses : actions/upload-artifact@v3
78+ if : matrix.platform.os == 'ubuntu-latest'
79+ with :
80+ name : build web
81+ path : " dist/${{ steps.pack-webapp.outputs.ZIPFILE }}"
8282
8383 publish :
8484 needs : build-binaries
8888 contents : write
8989 steps :
9090 - uses : actions/checkout@v3
91+
9192 # Download the previously uploaded artifacts
9293 - uses : actions/download-artifact@v3
9394 id : download
@@ -99,6 +100,21 @@ jobs:
99100 mv artifacts/aarch64-apple-darwin/TrguiNG.app.tar.gz artifacts/aarch64-apple-darwin/TrguiNG_aarch64.app.tar.gz
100101 - name : Downloaded artifacts
101102 run : ls -lhR artifacts/
103+
104+ # Generate chagnelog
105+ - id : prevtag
106+ run : |
107+ PREVIOUS_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo '')
108+ echo "previous_tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT
109+
110+ - name : Generate changelog
111+ id : changelog
112+ uses : jaywcjlove/changelog-generator@main
113+ if : steps.prevtag.outputs.previous_tag
114+ with :
115+ token : ${{ secrets.GITHUB_TOKEN }}
116+ show-emoji : false
117+
102118 # And create a release with the artifacts attached
103119 - name : ' create release'
104120 uses : softprops/action-gh-release@v0.1.15
@@ -107,3 +123,8 @@ jobs:
107123 with :
108124 draft : true
109125 files : ./artifacts/**/*
126+ body : |
127+ ${{ steps.changelog.outputs.compareurl }}
128+
129+ ${{ steps.changelog.outputs.changelog }}
130+
0 commit comments