Skip to content

Commit

Permalink
Update release workflow to mimic RC
Browse files Browse the repository at this point in the history
  • Loading branch information
njooma committed Aug 3, 2023
1 parent 7f04df8 commit 0bf0d56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,34 @@ on:
jobs:
prepare:
if: github.repository_owner == 'viamrobotics' && startsWith(github.ref_name, 'rc-')
environment: release
runs-on: [self-hosted, x64]
container:
image: ghcr.io/cirruslabs/flutter:3.10.6
outputs:
version: ${{ steps.which_version.outputs.version }}
steps:
- name: Check if organization member
id: is_organization_member
uses: jamessingleton/is-organization-member@1.0.1
with:
organization: viamrobotics
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Cancelling - not an organization member
uses: andymckay/cancel-action@0.2
if: steps.is_organization_member.outputs.result == 'false'

- name: Checkout Code
uses: actions/checkout@v3

- run: git config --global --add safe.directory /__w/viam-flutter-sdk/viam-flutter-sdk

- name: Setup Flutter
run: flutter pub get

- run: make setup

- name: Format + Lint + Test
run: make format lint test
- name: Format + Test
run: make format test

- name: Bump Version
shell: bash
run: PATH=$PATH:$HOME/.pub-cache/bin cider bump release
run: $HOME/.pub-cache/bin/cider bump release

- name: Which Version
id: which_version
shell: bash
run: PATH=$PATH:$HOME/.pub-cache/bin echo "version=$(cider version | sed -e 's/\"//g' -e 's/-rc.*//g')" >> $GITHUB_OUTPUT
run: echo "version=$($HOME/.pub-cache/bin/cider version | sed -e 's/\"//g' -e 's/-rc.*//g')" >> $GITHUB_OUTPUT

- name: Check if release exists
uses: cardinalby/git-get-release-action@1.2.4
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release_candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ jobs:
release:
needs: [prepare]
if: github.repository_owner == 'viamrobotics'
environment: release
runs-on: [self-hosted, x64]
container:
image: ghcr.io/viamrobotics/canon:amd64
Expand Down

0 comments on commit 0bf0d56

Please sign in to comment.