This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create and Upload Release | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Read version from manifest.json | ||
id: version | ||
run: | | ||
echo "version=$(jq -r .version manifest.json)" >> $GITHUB_OUTPUT | ||
- name: Extract changelog | ||
id: changelog | ||
run: | | ||
Check failure on line 16 in .github/workflows/release.yml GitHub Actions / Create and Upload ReleaseInvalid workflow file
|
||
CHANGELOG_CONTENT=$(sed -n "/## \[${{ steps.version.outputs.version }]\]/,/## \[/p" CHANGELOG.md | sed '$d') | ||
echo "changelog<<EOF" >> $GITHUB_OUTPUT | ||
echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
- name: Create Release Folder | ||
run: mkdir -p releases | ||
- name: Generate release tag | ||
id: tag | ||
run: | | ||
echo "release_tag=v${{ steps.version.outputs.version }}_$(date +'%Y.%m.%d_%H-%M-%S')" >> $GITHUB_OUTPUT | ||
- name: Archive Release | ||
uses: thedoctor0/zip-release@0.7.5 | ||
with: | ||
type: 'zip' | ||
filename: 'releases/release_${{ steps.version.outputs.version }}.zip' | ||
exclusions: '*.git* /*node_modules/* .editorconfig' | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "releases/release_${{ steps.version.outputs.version }}.zip" | ||
tag: ${{ steps.tag.outputs.release_tag }} | ||
name: "Release ${{ steps.version.outputs.version }}" | ||
body: | | ||
${{ steps.changelog.outputs.changelog }} | ||
For full changelog, please see [CHANGELOG.md](https://github.com/956MB/reddit-download-button/blob/main/CHANGELOG.md) | ||
token: ${{ secrets.GITHUB_TOKEN }} |