Skip to content

Finish migration to 2.0 #38

Finish migration to 2.0

Finish migration to 2.0 #38

Workflow file for this run

name: Create a new release
on:
workflow_dispatch:
pull_request:
push:
tags:
- 'v*.*'
# Ignore simple tags which are just "aliases" used by the Marketplace.
- '!v1'
- '!v2'
- '!v3'
- '!v4'
- '!v5'
- '!v6'
- '!v7'
- '!v8'
- '!v9'
jobs:
version:
name: Calculate the release version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Infer the release version. Assumes that tags are named `vX.Y.Z`.
- id: version
run: |
if [[ "${GITHUB_REF_TYPE}" == 'branch' ]]
then
RELEASE_VERSION="${GITHUB_SHA}"
else
RELEASE_VERSION="${GITHUB_REF#'refs/tags/v'}"
RELEASE_VERSION="${RELEASE_VERSION//'/'/_}"
fi
echo "release-version=${RELEASE_VERSION}" >>"${GITHUB_OUTPUT}"
shell: bash
- id: release
name: Create the release
if: ${{ github.ref_type == 'tag' }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.ref }}
release_name: v${{ steps.version.outputs.release-version }}
draft: false
prerelease: false
outputs:
release-version: ${{ steps.version.outputs.release-version }}
upload-url: ${{ steps.release.outputs.upload_url }}
move-tag:
name: Move the Marketplace tag
needs: [ version ]
uses: ./.github/workflows/move-marketplace-tag.yml
with:
release-version: ${{ needs.version.outputs.release-version }}
secrets: inherit