Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable automated tagging & releases for v2 preview releases #1332

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
name: "create release"

on:
push:
tags:
'*'
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
create-tag:
runs-on: ubuntu-latest
outputs:
SDK_VERSION: ${{ steps.tag-step.outputs.SDK_VERSION }}
steps:
- uses: actions/checkout@v3

- name: Get SDK version and set environment variable
run: |
SDK_VERSION=$(grep 'SDK_VERSION' src/GraphConstants.php | grep -oE '[0-9]+\.[0-9]+\.[0-9A-Za-z.\-]+')
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV

- id: tag-step
name: Create and publish tag
run: |
echo "SDK_VERSION is:"$SDK_VERSION
git tag $SDK_VERSION && git push origin $SDK_VERSION
echo "SDK_VERSION=$SDK_VERSION" >> "$GITHUB_OUTPUT"

create-release:
needs: create-tag
env:
SDK_VERSION: ${{ needs.create-tag.outputs.SDK_VERSION }}
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -20,5 +40,7 @@ jobs:
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
prerelease: ${{ contains(github.ref_name, 'RC') }}
prerelease: ${{ contains( env.SDK_VERSION, 'RC') }}
skipIfReleaseExists: true
tag: ${{ env.SDK_VERSION }}
name: "Release ${{ env.SDK_VERSION }}"
31 changes: 0 additions & 31 deletions .github/workflows/tag-release.yml

This file was deleted.