-
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.
chore(repo): add basic publish config
Signed-off-by: Bryan Gonzalez <[email protected]>
- Loading branch information
1 parent
52045e8
commit 468d257
Showing
4 changed files
with
136 additions
and
1 deletion.
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,83 @@ | ||
# name: Build and Release | ||
# on: | ||
# push: | ||
# tags: | ||
# - "*" | ||
|
||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
|
||
# strategy: | ||
# matrix: | ||
# target: | ||
# - linux-x64 | ||
# - linux-musl-x64 | ||
# - linux-arm | ||
# - linux-arm64 | ||
# - osx-x64 | ||
# - osx-arm64 | ||
# - win-arm64 | ||
# - win-x64 | ||
# - win-x86 | ||
|
||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Setup .NET | ||
# uses: actions/setup-dotnet@v3 | ||
# with: | ||
# dotnet-version: "8.0" | ||
|
||
# - name: Build and Publish | ||
# run: dotnet publish ./src/yk-csr-cli/GenerateYKCSR.csproj -c Release -r ${{ matrix.target }} --self-contained /p:PublishReadyToRun=true -o out/${{ matrix.target }} | ||
|
||
# - name: Upload artifacts | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: ${{ matrix.target }} | ||
# path: out/${{ matrix.target }} | ||
|
||
# release: | ||
# permissions: | ||
# contents: write | ||
# packages: write | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Create Release | ||
# id: create_release | ||
# uses: actions/create-release@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# tag_name: ${{ github.ref }} | ||
# release_name: Release ${{ github.ref }} | ||
# draft: false | ||
# prerelease: true | ||
|
||
# - name: Download all artifacts | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# path: ./artifacts | ||
|
||
# - name: Prepare output directory | ||
# run: mkdir -p out | ||
|
||
# - run: | | ||
# for target in linux-x64 linux-musl-x64 linux-arm linux-arm64 osx-x64 osx-arm64 win-arm64 win-x64 win-x86; do | ||
# echo "Zipping $target..." | ||
# zip -r ./out/$target.zip ./artifacts/$target | ||
# done | ||
|
||
# - run: | | ||
# for target in linux-x64 linux-musl-x64 linux-arm linux-arm64 osx-x64 osx-arm64 win-arm64 win-x64 win-x86; do | ||
# echo "Uploading $target..." | ||
# gh release upload ${{ github.ref }} ./out/$target.zip --clobber | ||
# done | ||
# env: | ||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,43 @@ | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
target: | ||
- linux-x64 | ||
- linux-musl-x64 | ||
- linux-arm | ||
- linux-arm64 | ||
- osx-x64 | ||
- osx-arm64 | ||
- win-arm64 | ||
- win-x64 | ||
- win-x86 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "8.0" | ||
|
||
- name: Build | ||
run: dotnet publish ./src/yk-csr-cli/GenerateYKCSR.csproj -c Release -r ${{ matrix.target }} --self-contained /p:PublishReadyToRun=true -o out/${{ matrix.target }} | ||
|
||
- name: Archive | ||
run: zip -r ./out/${{ matrix.target }}.zip ./out/${{ matrix.target }} | ||
|
||
- name: Upload | ||
run: gh release upload ${{github.event.release.tag_name}} ./out/${{ matrix.target }}.zip | ||
env: | ||
GITHUB_TOKEN: ${{ github.TOKEN }} | ||
shell: bash |
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