Skip to content

Commit

Permalink
Create release action
Browse files Browse the repository at this point in the history
  • Loading branch information
MWDelaney committed Dec 12, 2024
1 parent ab08392 commit cfe73a7
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# .github/workflows/create-release.yml
##
# Create a new release
##

name: 📦 Create Release
run-name: create-release

on:
workflow_dispatch:

env:
environment: production

jobs:
build:
# Only run this job if the repository has a GitHub Pages site
if: ${{ github.event.repository.has_pages }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Checkout the repo
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}

# Build the site
- name: 👷‍♂️ Build the site
uses: ./.github/actions/build
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

release:
needs: build
runs-on: ubuntu-latest
steps:

# Checkout the repo
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}

# Create a new release
- name: 📦 Create Release
uses: ./.github/actions/new-release
with:
environment: ${{ env.environment }}
ref: ${{ github.sha }}
github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cfe73a7

Please sign in to comment.