Browse Source

[BRE-127] Remove version input in self host release (#275)

* [BRE-127] Remove Version input in self-host Release

* Fix run-name

* Add echo

* Strip v from latest version

* Fix indentation

* Fix

* FIx

* Change name

* Echo next version

* Fix

* Remove testing steps
pull/277/head
Michał Chęciński 1 year ago committed by GitHub
parent
commit
2239d21465
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 29
      .github/workflows/release.yml

29
.github/workflows/release.yml

@ -1,13 +1,10 @@ @@ -1,13 +1,10 @@
---
name: Release
run-name: Release ${{ github.event.inputs.release_type }} v${{ github.event.inputs.release_version }}
run-name: Release ${{ github.event.inputs.release_type }}
on:
workflow_dispatch:
inputs:
release_version:
description: "Release Version"
required: true
release_type:
description: "Release Options"
required: true
@ -27,6 +24,7 @@ jobs: @@ -27,6 +24,7 @@ jobs:
outputs:
_WEB_RELEASE_TAG: ${{ steps.set-tags.outputs.WEB_RELEASE_TAG }}
_CORE_RELEASE_TAG: ${{ steps.set-tags.outputs.CORE_RELEASE_TAG }}
_VERSION: ${{ steps.get-next-version.outputs.version }}
steps:
- name: Branch check
if: ${{ github.event.inputs.release_type != 'Dry Run' }}
@ -47,15 +45,18 @@ jobs: @@ -47,15 +45,18 @@ jobs:
with:
repository: bitwarden/self-host
- name: Check Release Version
- name: Strip version
env:
RELEASE_VERSION: ${{ github.event.inputs.release_version }}
PREVIOUS_RELEASE_VERSION: ${{ steps.get-self-host.outputs.version }}
CURRENT_VERSION: ${{ steps.get-self-host.outputs.version }}
run: |
if [ "$RELEASE_VERSION" == "$PREVIOUS_RELEASE_VERSION" ]; then
echo "[!] Already released v$RELEASE_VERSION. Please bump version to continue"
exit 1
fi
VERSION_STRIPPED=$(echo $CURRENT_VERSION | sed 's/^v//')
echo "VERSION=$VERSION_STRIPPED" >> $GITHUB_ENV
- name: Get Next Release Version
id: get-next-version
uses: bitwarden/gh-actions/version-next@main
with:
version: ${{ env.VERSION }}
- name: Set Release Tags
id: set-tags
@ -86,8 +87,8 @@ jobs: @@ -86,8 +87,8 @@ jobs:
run.ps1,
version.json'
commit: ${{ github.sha }}
tag: "v${{ github.event.inputs.release_version }}"
name: "Version ${{ github.event.inputs.release_version }}"
tag: "v${{ needs.setup.outputs._VERSION }}"
name: "Version ${{ needs.setup.outputs._VERSION }}"
body: "<insert release notes here>"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
@ -232,7 +233,7 @@ jobs: @@ -232,7 +233,7 @@ jobs:
- setup
- release
env:
_RELEASE_VERSION: ${{ github.event.inputs.release_version }}-beta # TODO: remove `-beta` after GA
_RELEASE_VERSION: ${{ needs.setup.outputs._VERSION }}-beta # TODO: remove `-beta` after GA
steps:
########## DockerHub ##########
- name: Setup DCT

Loading…
Cancel
Save