-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up GH actions for releases (#415)
Signed-off-by: Matty Stratton <[email protected]>
- Loading branch information
1 parent
52f6f48
commit 30f14e1
Showing
4 changed files
with
134 additions
and
8 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# .github/release.yml | ||
|
||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
- duplicate | ||
- question | ||
- invalid | ||
- wontfix | ||
- do-not-merge | ||
- no-changelog | ||
- dependencies | ||
authors: | ||
- dependabot | ||
categories: | ||
- title: Fixed Bugs 🐛 | ||
labels: | ||
- bug | ||
- breaking-change | ||
- title: Exciting New Features 🎉 | ||
labels: | ||
- Enhancement | ||
- title: Other Changes | ||
labels: | ||
- "*" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Prepare Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseType: | ||
description: 'Release Type' | ||
required: true | ||
default: 'patch' | ||
type: choice | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
|
||
# push: | ||
# tags: | ||
# - '*' | ||
jobs: | ||
prepare-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
echo "Release type: $TYPE" | ||
env: | ||
TYPE: ${{ inputs.releaseType }} | ||
- uses: actions/checkout@master | ||
- name: Get Next Version | ||
uses: reecetech/[email protected] | ||
id: version | ||
with: | ||
scheme: semver | ||
increment: $TYPE | ||
- name: Update theme TOML | ||
run: sed -i '' "s/${{ github.ref_name }}/${{ steps.version.outputs.version }}/g" ./theme.toml | ||
- name: Generate Changelog | ||
uses: heinrichreimer/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
user: mattstratton | ||
project: castanet | ||
future-release: ${{ steps.version.outputs.version }} | ||
issues: "true" | ||
issuesWoLabels: "false" | ||
pullRequests: "true" | ||
prWoLabels: "false" | ||
compareLink: "false" | ||
excludeLabels: 'duplicate,question,invalid,wontfix,do-not-merge,no-changelog' | ||
- name: Commit changed files | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
add: '["theme.toml", "CHANGELOG.md"]' | ||
author_name: "Matt Stratton" | ||
author_email: "[email protected]" | ||
message: "Update theme to version ${{ steps.version.outputs.version }}" | ||
tag: "${{ steps.version.outputs.version }} --force" | ||
tag_push: '--force' | ||
# - name: Create Zip File For Release | ||
# uses: thedoctor0/zip-release@master | ||
# with: | ||
# command: "mkdir -p release" | ||
# type: 'zip' | ||
# filename: "release/${{ github.ref_name }}.zip" | ||
# exclusions: '*.git* /*node_modules/* /*exampleSite/* /*.circleci/* /*bin/* /*gulp/* /*images/* /*release/* /*test/* /*utils/* .nvmrc CODE_OF_CONDUCT.md contributing.json CONTRIBUTING.md gulpfile.js lighthouserc.js matt-test.txt netlify.toml package.json package-lock.json' | ||
# - name: Upload Release | ||
# uses: ncipollo/release-action@v1 | ||
# with: | ||
# artifacts: "release/${{ github.ref_name }}.zip" | ||
# generateReleaseNotes: true | ||
# makeLatest: true | ||
# token: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Release | ||
on: | ||
# workflow_run: | ||
# workflows: [prepare-release] | ||
# types: | ||
# - completed | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Zip File For Release | ||
uses: thedoctor0/zip-release@master | ||
with: | ||
command: "mkdir -p release" | ||
type: 'zip' | ||
filename: "release/${{ github.ref_name }}.zip" | ||
exclusions: '*.git* /*node_modules/* /*exampleSite/* /*.circleci/* /*bin/* /*gulp/* /*images/* /*release/* /*test/* /*utils/* .nvmrc CODE_OF_CONDUCT.md contributing.json CONTRIBUTING.md gulpfile.js lighthouserc.js matt-test.txt netlify.toml package.json package-lock.json' | ||
- name: Upload Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "release/${{ github.ref_name }}.zip" | ||
generateReleaseNotes: true | ||
makeLatest: true | ||
token: ${{ secrets.GITHUB_TOKEN }} |