Skip to content

Commit

Permalink
Added a release workflow triggerred on a tag.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock committed Oct 22, 2024
1 parent 352e620 commit d13e11c
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Draft a Release

on:
push:
tags:
- "*"

Check failure on line 6 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

Check failure on line 6 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

jobs:
draft-a-release:
name: Draft a Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write

steps:
- name: Checkout the repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

Check failure on line 23 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

Check failure on line 23 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

- name: Build
run: npm ci && npm run merge

- name: Upload Artifacts
id: upload
uses: actions/upload-artifact@v4
with:
name: build
path: |
build/*
- name: Release Specification to GitHub
id: release
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: ${{ github.ref_name }}
prerelease: true
title: OpenSearch OpenAPI Spec (${{ github.ref_name }})
files: |
LICENSE.txt
build/*
- name: Extract Changelog
id: changelog
uses: sean0x42/markdown-extract@v2
with:
file: CHANGELOG.md
pattern: Unreleased

- name: Update Release Description
id: update
uses: tubone24/update_release@v1.3.1
env:
TAG_NAME: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
${{ steps.changelog.outputs.markdown }}
### Links
- [Build Artifact](${{ steps.upload.outputs.artifact-url }})

0 comments on commit d13e11c

Please sign in to comment.