-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: 🛠Add artifact publishing to releases
- Loading branch information
Showing
3 changed files
with
99 additions
and
28 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 |
---|---|---|
@@ -1,36 +1,28 @@ | ||
name: generate outputs | ||
name: Generate Outputs for Review | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
merge_group: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
# on: | ||
# push: | ||
# paths: | ||
# - '**.kicad_sch' | ||
# - '**.kicad_pcb' | ||
# pull_request: | ||
# paths: | ||
# - '**.kicad_sch' | ||
# - '**.kicad_pcb' | ||
|
||
jobs: | ||
generate_outputs: | ||
build: | ||
name: Generate Outputs for Review | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: gitmarker | ||
run: "for i in *.kicad_pcb; do git rev-parse --short HEAD | xargs -I % sed -i 's/{GITHASH}/%/g' $i; done" # add git marker | ||
- uses: INTI-CMNB/KiBot@v2_k7 | ||
with: | ||
# Required - kibot config file | ||
config: config.kibot.yaml | ||
# optional - prefix to output defined in config | ||
dir: output | ||
- name: upload results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: output | ||
path: output | ||
- uses: actions/checkout@v4 | ||
- name: gitmarker | ||
run: "for i in *.kicad_pcb; do git rev-parse --short HEAD | xargs -I % sed -i 's/{GITHASH}/%/g' $i; done" # add git marker | ||
- uses: INTI-CMNB/KiBot@v2_k7 | ||
with: | ||
# Required - kibot config file | ||
config: config.kibot.yaml | ||
# optional - prefix to output defined in config | ||
dir: output | ||
- name: Upload temporary artifacts for review | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: output | ||
path: output |
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,39 @@ | ||
name: Upload Pre-Release Asset | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Upload Pre-Release Asset | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set tag hash | ||
id: tag | ||
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: gitmarker | ||
run: "for i in *.kicad_pcb; do sed -i 's/{GITHASH}/${{ steps.tag.outputs.hash }}/g' $i; done" # add git marker | ||
- uses: INTI-CMNB/KiBot@v2_k7 | ||
with: | ||
# Required - kibot config file | ||
config: config.kibot.yaml | ||
# optional - prefix to output defined in config | ||
dir: output | ||
- name: Release with Notes | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body: Publish new snapshot of PCB @ ${{ github.sha }} | ||
tag_name: preview-${{ steps.tag.outputs.hash }} | ||
prerelease: true | ||
fail_on_unmatched_files: true | ||
files: | | ||
output/** | ||
env: | ||
GITHUB_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,40 @@ | ||
name: Upload Release Asset | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
name: Upload Release Asset | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set tag hash | ||
id: tag | ||
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: gitmarker | ||
run: "for i in *.kicad_pcb; do sed -i 's/{GITHASH}/${{ steps.tag.outputs.hash }}/g' $i; done" # add git marker | ||
- uses: INTI-CMNB/KiBot@v2_k7 | ||
with: | ||
# Required - kibot config file | ||
config: config.kibot.yaml | ||
# optional - prefix to output defined in config | ||
dir: output | ||
- name: Release with Notes | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body: Publish new version of PCB | ||
tag_name: ${{ github.ref_name }} | ||
prerelease: false | ||
make_latest: true | ||
fail_on_unmatched_files: true | ||
files: | | ||
output/** | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |