4 |
branches: |
branches: |
5 |
- main |
- main |
6 |
|
|
7 |
|
permissions: |
8 |
|
contents: write |
9 |
|
|
10 |
jobs: |
jobs: |
11 |
build: |
build: |
12 |
if: github.repository_owner == 'onesoft-sudo' |
if: github.repository_owner == 'onesoft-sudo' |
18 |
runs-on: ${{ matrix.os }} |
runs-on: ${{ matrix.os }} |
19 |
|
|
20 |
steps: |
steps: |
21 |
- uses: actions/checkout@v3 |
- uses: actions/checkout@v4 |
22 |
|
|
23 |
- name: Use Node.js 21.x |
- name: Use Node.js 21.x |
24 |
uses: actions/setup-node@v3 |
uses: actions/setup-node@v4 |
25 |
with: |
with: |
26 |
node-version: 21.x |
node-version: 21.x |
27 |
|
|
60 |
tar -cvzf sudobot-release-${OS}-incomplete.tar.gz sudobot-release-${OS}; |
tar -cvzf sudobot-release-${OS}-incomplete.tar.gz sudobot-release-${OS}; |
61 |
|
|
62 |
- name: Upload Release Artifacts |
- name: Upload Release Artifacts |
63 |
uses: actions/upload-artifact@v3 |
uses: actions/upload-artifact@v4 |
64 |
with: |
with: |
65 |
name: sudobot-release-${{ matrix.os }}-incomplete |
name: sudobot-release-${{ matrix.os }}-incomplete |
66 |
path: | |
path: | |
72 |
runs-on: ubuntu-latest |
runs-on: ubuntu-latest |
73 |
|
|
74 |
steps: |
steps: |
75 |
- uses: actions/checkout@v3 |
- uses: actions/checkout@v4 |
76 |
|
|
77 |
- name: Prepare Git |
- name: Prepare Git |
78 |
run: | |
run: | |
82 |
git config --global user.signingkey "6AE7B08C68169452" |
git config --global user.signingkey "6AE7B08C68169452" |
83 |
git config --global commit.gpgsign true |
git config --global commit.gpgsign true |
84 |
|
|
85 |
- name: Conventional Changelog Action |
- name: Conventional Release Action |
86 |
id: changelog |
id: auto_release |
87 |
uses: TriPSs/conventional-changelog-action@v5 |
uses: onesoft-sudo/conventional-release-action@main |
88 |
with: |
with: |
89 |
github-token: ${{ secrets.__TOKEN }} |
version-json-file: "./package.json" |
90 |
version-file: "./package.json" |
git-user-name: "Conventional Release Action" |
|
git-user-name: "Conventional Changelog Action" |
|
91 |
git-user-email: [email protected] |
git-user-email: [email protected] |
92 |
git-message: | |
commit-message-format: "release: v%s [skip ci]" |
93 |
release: {version} [skip ci] |
git-sign-off: true |
94 |
|
changelog-file: CHANGELOG.md |
95 |
Signed-off-by: Ar Rakin <[email protected]> |
changelog-format: markdown |
96 |
|
allowed-commit-types: feat,fix,refactor,perf,ci,build,test,revert,chore,release,deps |
97 |
|
|
98 |
- name: Download Linux Release Artifact |
- name: Download Linux Release Artifact |
99 |
uses: actions/download-artifact@v2 |
uses: actions/download-artifact@v4 |
100 |
with: |
with: |
101 |
name: sudobot-release-ubuntu-latest-incomplete |
name: sudobot-release-ubuntu-latest-incomplete |
102 |
|
|
103 |
- name: Download macOS Release Artifact |
- name: Download macOS Release Artifact |
104 |
uses: actions/download-artifact@v2 |
uses: actions/download-artifact@v4 |
105 |
with: |
with: |
106 |
name: sudobot-release-macos-latest-incomplete |
name: sudobot-release-macos-latest-incomplete |
107 |
|
|
128 |
- name: Create Release |
- name: Create Release |
129 |
id: create_release |
id: create_release |
130 |
uses: ncipollo/release-action@v1 |
uses: ncipollo/release-action@v1 |
131 |
if: ${{ steps.changelog.outputs.skipped == 'false' }} |
if: ${{ steps.auto_release.outputs.tag != '' }} |
132 |
env: |
env: |
133 |
GITHUB_TOKEN: ${{ secrets.__TOKEN }} |
GITHUB_TOKEN: ${{ secrets.__TOKEN }} |
134 |
with: |
with: |
135 |
tag: ${{ steps.changelog.outputs.tag }} |
tag: ${{ steps.auto_release.outputs.tag }} |
136 |
name: ${{ steps.changelog.outputs.tag }} |
name: ${{ steps.auto_release.outputs.tag }} |
137 |
body: ${{ steps.changelog.outputs.clean_changelog }} |
body: ${{ steps.auto_release.outputs.release_notes }} |
138 |
artifactContentType: application/x-gzip |
artifactContentType: application/x-gzip |
139 |
artifacts: ./sudobot-release-linux.tar.gz,./sudobot-release-darwin.tar.gz |
artifacts: ./sudobot-release-linux.tar.gz,./sudobot-release-darwin.tar.gz |