Skip to content

Commit

Permalink
never mind
Browse files Browse the repository at this point in the history
  • Loading branch information
purplenicole730 committed Dec 19, 2024
1 parent 4717cbe commit 4da1ea9
Showing 1 changed file with 76 additions and 76 deletions.
152 changes: 76 additions & 76 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,72 @@ on:
- nobump

jobs:
# prepare:
# if: github.repository_owner == 'viamrobotics'
# runs-on: [self-hosted, x64]
# container:
# image: ghcr.io/viamrobotics/canon:amd64
# outputs:
# version: ${{ steps.which_version.outputs.version }}
# sha: ${{ steps.commit.outputs.commit_long_sha }}
# steps:
# - name: Check if organization member
# id: is_organization_member
# uses: jamessingleton/[email protected]
# with:
# organization: viamrobotics
# username: ${{ github.actor }}
# token: ${{ secrets.GITHUB_TOKEN }}
prepare:
if: github.repository_owner == 'viamrobotics'
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64
outputs:
version: ${{ steps.which_version.outputs.version }}
sha: ${{ steps.commit.outputs.commit_long_sha }}
steps:
- name: Check if organization member
id: is_organization_member
uses: jamessingleton/[email protected]
with:
organization: viamrobotics
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}

# - name: Cancelling - user not part of organization
# uses: andymckay/[email protected]
# if: |
# steps.is_organization_member.outputs.result == 'false'
- name: Cancelling - user not part of organization
uses: andymckay/[email protected]
if: |
steps.is_organization_member.outputs.result == 'false'
# - name: Checkout Code
# uses: actions/checkout@v3
- name: Checkout Code
uses: actions/checkout@v3

# - name: Setup rust toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

# - name: Bump Version
# shell: bash
# if: inputs.version != 'nobump'
# run: |
# cargo install cargo-bump
# cargo bump ${{ inputs.version }}
- name: Bump Version
shell: bash
if: inputs.version != 'nobump'
run: |
cargo install cargo-bump
cargo bump ${{ inputs.version }}
# - name: Which Version
# id: which_version
# shell: bash
# run: |
# echo "version=$(cargo pkgid | sed 's/.*@//g')" >> $GITHUB_OUTPUT
- name: Which Version
id: which_version
shell: bash
run: |
echo "version=$(cargo pkgid | sed 's/.*@//g')" >> $GITHUB_OUTPUT
# - name: Check if release exists
# uses: cardinalby/[email protected]
# id: release_exists
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# releaseName: v${{ steps.which_version.outputs.version }}
# doNotFailIfNotFound: "true"
- name: Check if release exists
uses: cardinalby/[email protected]
id: release_exists
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseName: v${{ steps.which_version.outputs.version }}
doNotFailIfNotFound: "true"

# - name: Cancelling - release already exists
# uses: andymckay/[email protected]
# if: steps.release_exists.outputs.id != ''
- name: Cancelling - release already exists
uses: andymckay/[email protected]
if: steps.release_exists.outputs.id != ''

# - name: Commit + Push
# id: commit
# uses: EndBug/[email protected]
# with:
# default_author: github_actions
# message: Bumping version to v${{ steps.which_version.outputs.version }} [skip ci]
- name: Commit + Push
id: commit
uses: EndBug/[email protected]
with:
default_author: github_actions
message: Bumping version to v${{ steps.which_version.outputs.version }} [skip ci]

build_macos:
# if: github.repository_owner == 'viamrobotics'
# needs: [prepare]
if: github.repository_owner == 'viamrobotics'
needs: [prepare]
runs-on: [self-hosted, ARM64, macOS]
strategy:
fail-fast: false
Expand All @@ -93,8 +93,8 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v3
# with:
# ref: ${{ needs.prepare.outputs.sha }}
with:
ref: ${{ needs.prepare.outputs.sha }}
- name: Setup rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -114,8 +114,8 @@ jobs:
path: builds

build_linux:
# if: github.repository_owner == 'viamrobotics'
# needs: [prepare]
if: github.repository_owner == 'viamrobotics'
needs: [prepare]
runs-on: [self-hosted, x64]
container:
image: ghcr.io/cross-rs/${{ matrix.image }}
Expand Down Expand Up @@ -158,21 +158,21 @@ jobs:
name: linux-builds-${{ matrix.platform }}
path: builds

# release:
# needs: [prepare, build_macos, build_linux]
# if: github.repository_owner == 'viamrobotics'
# runs-on: [self-hosted, x64]
# container:
# image: ghcr.io/viamrobotics/canon:amd64
release:
needs: [prepare, build_macos, build_linux]
if: github.repository_owner == 'viamrobotics'
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64

# steps:
# - uses: actions/download-artifact@v3
steps:
- uses: actions/download-artifact@v3

# - name: Release
# uses: softprops/action-gh-release@v1
# with:
# tag_name: v${{ needs.prepare.outputs.version }}
# files: builds/*
# draft: true
# prerelease: false
# fail_on_unmatched_files: true
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ needs.prepare.outputs.version }}
files: builds/*
draft: true
prerelease: false
fail_on_unmatched_files: true

0 comments on commit 4da1ea9

Please sign in to comment.