Skip to content

Commit

Permalink
Revert "ci: Add support to publish experimental releases" (Doist#279)
Browse files Browse the repository at this point in the history
Revert "ci: Add support to publish experimental releases (Doist#278)"

This reverts commit 36c1d1b.
  • Loading branch information
rfgamaral committed May 30, 2023
1 parent 36c1d1b commit dc57964
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 34 deletions.
23 changes: 1 addition & 22 deletions .github/workflows/publish-typist-package-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Typist Package Release

on:
workflow_dispatch:
workflow_run:
workflows:
- CI Validation
Expand Down Expand Up @@ -29,11 +28,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60

# Only run this job when manually triggered for the `experimental` branch, or when triggered
# by the `CI Validation` workflow for the `main` branch
if: |
(github.event_name == 'workflow_dispatch' && contains(github.ref, 'experimental')) ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
if: github.event.workflow_run.conclusion == 'success'

steps:
- name: Checkout repository
Expand Down Expand Up @@ -95,19 +90,3 @@ jobs:
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

fail-manual-trigger:
name: Release & Publish
runs-on: ubuntu-latest
timeout-minutes: 60

# Only run this job when manually triggered for all branches with the exception for the
# `experimental` branch (which is the only branch allowed to be manually triggered)
if: github.event_name == 'workflow_dispatch' && !contains(github.ref, 'experimental')

steps:
- name: Fail job with a message
uses: actions/github-script@v6
with:
script: |
core.setFailed('Triggering this workflow manually is only allowed for the `experimental` branch.')
6 changes: 1 addition & 5 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"branches": [
"main",
{
"name": "experimental",
"prerelease": true
}
"main"
],
"plugins": [
[
Expand Down
7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ After cloning Typist and installing all dependencies, several commands are at yo

The release process for Typist is almost fully automated with [`semantic-release`](https://github.com/semantic-release/semantic-release), only requiring a core team member to trigger [this workflow](https://github.com/Doist/typist/actions/workflows/publish-typist-package-release.yml) manually whenever a new release needs to be published.

#### Experimental Releases

Sometimes the need for an experimental release arises before a new feature or fix is ready for a stable release. In these cases, we can publish an experimental release by pushing code to the `experimental` branch, and manually triggering the [this workflow](https://github.com/Doist/typist/actions/workflows/publish-typist-package-release.yml). The version number will be automatically picked by `semantic-release`, and `-experimental.x` will be appended at the end of the version number, where `x` represents the number of experimental release published to the `experimental` branch.

> **Warning**
> The `experimental` branch should never be deleted nor rebased with `main`, otherwise we might lose the Git tags required for `semantic-release` to properly pick the next experimental version number. Instead, `main` should be merged into the `experimental` branch with a merge commit before pushing new code to the `experimental` branch, so that those experiments are always published with the latest published stable version.
### Visual Studio Code

#### CSS Modules for Storybook
Expand Down

0 comments on commit dc57964

Please sign in to comment.