-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devops: added release pipeline and automatic issue closing
Signed-off-by: aserowy <serowy@hotmail.com>
- Loading branch information
Showing
4 changed files
with
95 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Configuration for probot-no-response - https://github.com/probot/no-response | ||
daysUntilClose: 14 | ||
responseRequiredLabel: question | ||
closeComment: > | ||
This issue has been automatically closed because there has been no response | ||
to the request for more information from the original author. With only the | ||
information that is currently in the issue, there isn't enough information | ||
to take further action. Please reach out if you have or find the answers we | ||
need so that we can investigate further. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
- os: ubuntu-latest | ||
target: aarch64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
- os: macos-latest | ||
target: aarch64-apple-darwin | ||
- os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
- os: windows-latest | ||
target: aarch64-pc-windows-msvc | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: setup rust | ||
run: rustup toolchain install stable --profile minimal | ||
|
||
- name: add targets | ||
if: contains(fromJson('["aarch64-unknown-linux-gnu", "aarch64-apple-darwin", "aarch64-pc-windows-msvc"]'), matrix.target) | ||
run: rustup target add ${{ matrix.target }} | ||
|
||
- name: install gcc for linux target | ||
if: matrix.target == 'aarch64-unknown-linux-gnu' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -yq gcc-aarch64-linux-gnu | ||
- name: setup rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: build target | ||
env: | ||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: /usr/bin/aarch64-linux-gnu-gcc | ||
run: cargo build --release --locked --target ${{ matrix.target }} | ||
|
||
- name: build snap | ||
if: matrix.target == 'x86_64-unknown-linux-gnu' | ||
uses: snapcore/action-build@v1 | ||
|
||
- name: pack unix artifacts | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | ||
env: | ||
TARGET_NAME: yeet-${{ matrix.target }} | ||
run: | | ||
mkdir $TARGET_NAME | ||
cp target/${{ matrix.target }}/release/yeet $TARGET_NAME | ||
cp README.md LICENSE $TARGET_NAME | ||
zip -r $TARGET_NAME.zip $TARGET_NAME | ||
- name: pack win artifacts | ||
if: matrix.os == 'windows-latest' | ||
env: | ||
TARGET_NAME: yeet-${{ matrix.target }} | ||
run: | | ||
New-Item -ItemType Directory -Path ${env:TARGET_NAME} | ||
Copy-Item -Path "target\${{ matrix.target }}\release\yeet.exe" -Destination ${env:TARGET_NAME} | ||
Copy-Item -Path "README.md", "LICENSE" -Destination ${env:TARGET_NAME} | ||
Compress-Archive -Path ${env:TARGET_NAME} -DestinationPath "${env:TARGET_NAME}.zip" | ||
- name: release on gh | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
draft: true | ||
files: | | ||
yeet-${{ matrix.target }}.zip | ||
yeet*.snap | ||
generate_release_notes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters