Skip to content

Commit d1fdc55

Browse files
authored
RC is too finicky, do only prod (#87)
1 parent 48bb0c7 commit d1fdc55

File tree

3 files changed

+128
-119
lines changed

3 files changed

+128
-119
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,5 @@ jobs:
2020
- name: Install dependencies
2121
run: flutter pub get
2222

23-
- name: Publish - dry run
24-
run: flutter pub publish --dry-run
25-
2623
- name: Publish to pub.dev
2724
run: flutter pub publish -f

.github/workflows/release.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ name: Release
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The type of version bump."
8+
type: choice
9+
required: true
10+
default: nobump
11+
options:
12+
- major
13+
- minor
14+
- patch
15+
- nobump
516

617
jobs:
718
prepare:
@@ -27,13 +38,14 @@ jobs:
2738
run: make format test
2839

2940
- name: Bump Version
41+
if: inputs.version != 'nobump'
3042
shell: bash
31-
run: $HOME/.pub-cache/bin/cider bump release
43+
run: $HOME/.pub-cache/bin/cider bump ${{ inputs.version }}
3244

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

3850
- name: Check if release exists
3951
uses: cardinalby/[email protected]
@@ -51,7 +63,7 @@ jobs:
5163
- name: Add + Commit
5264
uses: EndBug/add-and-commit@v9
5365
with:
54-
new_branch: rc-${{ steps.which_version.outputs.version }}
66+
new_branch: v${{ steps.which_version.outputs.version }}
5567
message: Bump version to ${{ steps.which_version.outputs.version }}
5668

5769
- name: Open PR
Lines changed: 113 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,113 @@
1-
name: Release Candidate
2-
3-
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: "The type of version bump. If the current version is already RC, then the bump type is ignored and only the RC is increased. If nobump is selected, there is no RC increase. Ex: Current Version (CV): 0.0.1, type: patch, result: 0.0.2-rc.1. CV: 0.0.2-rc.1, type: patch, result: 0.0.2-rc.2. See https://github.com/f3ath/cider#bumping-the-project-version"
8-
type: choice
9-
required: true
10-
default: nobump
11-
options:
12-
- major
13-
- minor
14-
- patch
15-
- nobump
16-
17-
jobs:
18-
prepare:
19-
if: github.repository_owner == 'viamrobotics'
20-
environment: release
21-
runs-on: [self-hosted, x64]
22-
container:
23-
image: ghcr.io/cirruslabs/flutter:3.10.6
24-
outputs:
25-
rc_version: ${{ steps.which_version.outputs.rc_version }}
26-
version: ${{ steps.which_version.outputs.version }}
27-
steps:
28-
- name: Install GH CLI
29-
run: |
30-
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
31-
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
32-
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
33-
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
34-
&& sudo apt update \
35-
&& sudo apt install gh -y
36-
37-
- name: Checkout Code
38-
uses: actions/checkout@v3
39-
40-
- run: git config --global --add safe.directory /__w/viam-flutter-sdk/viam-flutter-sdk
41-
42-
- name: Setup Flutter
43-
run: flutter pub get
44-
45-
- run: make setup
46-
47-
- name: Format + Test
48-
run: make format test
49-
50-
- name: Current version
51-
id: current_version
52-
shell: bash
53-
run: |
54-
echo "current_version=$($HOME/.pub-cache/bin/cider version)" >> $GITHUB_OUTPUT
55-
56-
- name: Bump Version
57-
id: bump_version
58-
if: inputs.version != 'nobump'
59-
shell: bash
60-
run: |
61-
if ${{ contains(steps.current_version.outputs.current_version, 'rc') }} ; then
62-
$HOME/.pub-cache/bin/cider bump pre
63-
else
64-
$HOME/.pub-cache/bin/cider bump ${{ inputs.version }} --pre=rc
65-
fi
66-
67-
- name: Which Version
68-
id: which_version
69-
shell: bash
70-
run: |
71-
echo "rc_version=$($HOME/.pub-cache/bin/cider version | sed 's/\"//g')" >> $GITHUB_OUTPUT
72-
echo "version=$($HOME/.pub-cache/bin/cider version | sed -e 's/\"//g' -e 's/-rc.*//g')" >> $GITHUB_OUTPUT
73-
74-
- name: Check if release exists
75-
uses: cardinalby/[email protected]
76-
id: release_exists
77-
env:
78-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79-
with:
80-
releaseName: v${{ steps.which_version.outputs.rc_version }}
81-
doNotFailIfNotFound: "true"
82-
83-
- name: Cancelling - release already exists
84-
uses: andymckay/[email protected]
85-
if: steps.release_exists.outputs.id != ''
86-
87-
- name: Add + Commit
88-
uses: EndBug/add-and-commit@v9
89-
with:
90-
new_branch: rc-${{ steps.which_version.outputs.version }}
91-
message: Bump version to ${{ steps.which_version.outputs.rc_version }}
92-
93-
- name: Open PR
94-
run: |
95-
gh pr create -t "rc-${{ steps.which_version.outputs.version }}" -b "This is an auto-generated PR to merge the RC branch back into main upon successful release" -B "main" -H "rc-${{ steps.which_version.outputs.version }}"
96-
env:
97-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98-
99-
release:
100-
needs: [prepare]
101-
if: github.repository_owner == 'viamrobotics'
102-
runs-on: [self-hosted, x64]
103-
container:
104-
image: ghcr.io/viamrobotics/canon:amd64
105-
106-
steps:
107-
- name: Release
108-
uses: softprops/action-gh-release@v1
109-
with:
110-
tag_name: v${{ needs.prepare.outputs.rc_version }}
111-
draft: true
112-
prerelease: true
113-
target_commitish: rc-${{ needs.prepare.outputs.version }}
1+
# name: Release Candidate
2+
3+
# on:
4+
# workflow_dispatch:
5+
# inputs:
6+
# version:
7+
# description: "The type of version bump. If the current version is already RC, then the bump type is ignored and only the RC is increased. If nobump is selected, there is no RC increase. Ex: Current Version (CV): 0.0.1, type: patch, result: 0.0.2-rc.1. CV: 0.0.2-rc.1, type: patch, result: 0.0.2-rc.2. See https://github.com/f3ath/cider#bumping-the-project-version"
8+
# type: choice
9+
# required: true
10+
# default: nobump
11+
# options:
12+
# - major
13+
# - minor
14+
# - patch
15+
# - nobump
16+
17+
# jobs:
18+
# prepare:
19+
# if: github.repository_owner == 'viamrobotics'
20+
# environment: release
21+
# runs-on: [self-hosted, x64]
22+
# container:
23+
# image: ghcr.io/cirruslabs/flutter:3.10.6
24+
# outputs:
25+
# rc_version: ${{ steps.which_version.outputs.rc_version }}
26+
# version: ${{ steps.which_version.outputs.version }}
27+
# steps:
28+
# - name: Install GH CLI
29+
# run: |
30+
# type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
31+
# curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
32+
# && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
33+
# && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
34+
# && sudo apt update \
35+
# && sudo apt install gh -y
36+
37+
# - name: Checkout Code
38+
# uses: actions/checkout@v3
39+
40+
# - run: git config --global --add safe.directory /__w/viam-flutter-sdk/viam-flutter-sdk
41+
42+
# - name: Setup Flutter
43+
# run: flutter pub get
44+
45+
# - run: make setup
46+
47+
# - name: Format + Test
48+
# run: make format test
49+
50+
# - name: Current version
51+
# id: current_version
52+
# shell: bash
53+
# run: |
54+
# echo "current_version=$($HOME/.pub-cache/bin/cider version)" >> $GITHUB_OUTPUT
55+
56+
# - name: Bump Version
57+
# id: bump_version
58+
# if: inputs.version != 'nobump'
59+
# shell: bash
60+
# run: |
61+
# if ${{ contains(steps.current_version.outputs.current_version, 'rc') }} ; then
62+
# $HOME/.pub-cache/bin/cider bump pre
63+
# else
64+
# $HOME/.pub-cache/bin/cider bump ${{ inputs.version }} --pre=rc
65+
# fi
66+
67+
# - name: Which Version
68+
# id: which_version
69+
# shell: bash
70+
# run: |
71+
# echo "rc_version=$($HOME/.pub-cache/bin/cider version | sed 's/\"//g')" >> $GITHUB_OUTPUT
72+
# echo "version=$($HOME/.pub-cache/bin/cider version | sed -e 's/\"//g' -e 's/-rc.*//g')" >> $GITHUB_OUTPUT
73+
74+
# - name: Check if release exists
75+
# uses: cardinalby/[email protected]
76+
# id: release_exists
77+
# env:
78+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
# with:
80+
# releaseName: v${{ steps.which_version.outputs.rc_version }}
81+
# doNotFailIfNotFound: "true"
82+
83+
# - name: Cancelling - release already exists
84+
# uses: andymckay/[email protected]
85+
# if: steps.release_exists.outputs.id != ''
86+
87+
# - name: Add + Commit
88+
# uses: EndBug/add-and-commit@v9
89+
# with:
90+
# new_branch: rc-${{ steps.which_version.outputs.version }}
91+
# message: Bump version to ${{ steps.which_version.outputs.rc_version }}
92+
93+
# - name: Open PR
94+
# run: |
95+
# gh pr create -t "rc-${{ steps.which_version.outputs.version }}" -b "This is an auto-generated PR to merge the RC branch back into main upon successful release" -B "main" -H "rc-${{ steps.which_version.outputs.version }}"
96+
# env:
97+
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
99+
# release:
100+
# needs: [prepare]
101+
# if: github.repository_owner == 'viamrobotics'
102+
# runs-on: [self-hosted, x64]
103+
# container:
104+
# image: ghcr.io/viamrobotics/canon:amd64
105+
106+
# steps:
107+
# - name: Release
108+
# uses: softprops/action-gh-release@v1
109+
# with:
110+
# tag_name: v${{ needs.prepare.outputs.rc_version }}
111+
# draft: true
112+
# prerelease: true
113+
# target_commitish: rc-${{ needs.prepare.outputs.version }}

0 commit comments

Comments
 (0)