Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: debug pipeline #6

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 34 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ jobs:
os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
bin: runtipi-cli
name: runtipi-cli-Linux-aarch64.tar.gz
name: runtipi-cli-Linux-aarch64
command: build

- release_for: Linux-x86_64
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
bin: runtipi-cli
name: runtipi-cli-Linux-x86_64.tar.gz
name: runtipi-cli-Linux-x86_64
command: build

- release_for: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
bin: runtipi-cli
name: runtipi-cli-Darwin-aarch64.tar.gz
command: build
# - release_for: macOS-aarch64
# os: macOS-latest
# target: aarch64-apple-darwin
# bin: runtipi-cli
# name: runtipi-cli-Darwin-aarch64
# command: build

runs-on: ${{ matrix.platform.os }}
steps:
Expand All @@ -52,32 +52,49 @@ jobs:
args: "--locked --release"
strip: true

- name: Package as archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
cd -

- name: Upload CLI
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.name }}
path: target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }}
name: runtipi-cli-${{ matrix.platform.release_for }}
path: runtipi-cli-*

release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: runtipi-cli

- name: List artifacts
run: ls -la .

- uses: rickstaa/action-create-tag@v1
id: create-tag
with:
tag: ${{ inputs.version }}

- name: Create release
uses: actions/create-release@v1
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
**${{ inputs.version }}**
tag_name: ${{ inputs.version }}
release_name: ${{ inputs.version }}
name: ${{ inputs.version }}
draft: false
prerelease: true

- name: Download CLI artifacts
uses: actions/download-artifact@v2
with:
name: runtipi-cli-*.tar.gz
files: runtipi-*/**