Skip to content

Commit

Permalink
WIP: Temporarily run release workflow on push
Browse files Browse the repository at this point in the history
  • Loading branch information
cortadocodes committed Mar 18, 2024
1 parent 811fd84 commit 0b7d5cb
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
types: [closed]
branches:
- main
push:

jobs:
run-tests:
Expand All @@ -28,31 +29,31 @@ jobs:
BIGQUERY_EVENTS_TABLE: my-table
run: python -m unittest

release:
# This job will only run if the PR has been merged (and not closed without merging).
if: "github.event.pull_request.merged == true"
needs: run-tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get repo version
run: echo "VERSION=$(python setup.py --version)" >> $GITHUB_ENV

- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, no need to create your own.
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ github.event.pull_request.title }}
body: ${{ github.event.pull_request.body }}
draft: false
prerelease: false
# release:
# # This job will only run if the PR has been merged (and not closed without merging).
# if: "github.event.pull_request.merged == true"
# needs: run-tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
#
# - name: Get repo version
# run: echo "VERSION=$(python setup.py --version)" >> $GITHUB_ENV
#
# - name: Create release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, no need to create your own.
# with:
# tag_name: ${{ env.VERSION }}
# release_name: ${{ github.event.pull_request.title }}
# body: ${{ github.event.pull_request.body }}
# draft: false
# prerelease: false

upload-source:
if: "github.event.pull_request.merged == true"
# if: "github.event.pull_request.merged == true"
needs: release
runs-on: ubuntu-latest
permissions:
Expand Down

0 comments on commit 0b7d5cb

Please sign in to comment.