Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocalIdentity committed Feb 4, 2022
2 parents e31a92b + ad80bd5 commit 0cdd6fc
Show file tree
Hide file tree
Showing 161 changed files with 179,302 additions and 42,557 deletions.
20 changes: 20 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# .github/release.yml

changelog:
exclude:
labels:
- technical
- invalid
- duplicate
authors:
- github-actions
categories:
- title: Implemented Enhancements
labels:
- enhancement
- title: Fixed Bugs
labels:
- bug
- title: Other changes
labels:
- "*"
48 changes: 8 additions & 40 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,19 @@ jobs:
push-beta:
runs-on: ubuntu-latest
steps:
- name: Set line endings
run: git config --global core.autocrlf true
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v2.4.0
with:
ref: 'beta'
- name: Fetch tags
run: git fetch --prune --unshallow --tags
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y/%m/%d')"
- name: Get current version
id: current-version
run: echo "::set-output name=ver::$(git describe --tags --abbrev=0 | sed 's/^.//')"
- name: Get next version
id: next-version
run: |
ver=`git describe --tags --abbrev=0`
major=$(echo $ver | sed -r 's/^v([0-9]+)\.([0-9]+)\.([0-9]+)/\1/')
minor=$(echo $ver | sed -r 's/^v([0-9]+)\.([0-9]+)\.([0-9]+)/\2/')
patch=$(echo $ver | sed -r 's/^v([0-9]+)\.([0-9]+)\.([0-9]+)/\3/')
let minor+=1
semVer="$major.$minor.$patch"
echo "::set-output name=ver::$(echo $semVer)"
- name: Update from dev
ref: 'dev'
- name: Configure bot user
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git rebase -X ours origin/dev
- name: Install changelog generator
run: sudo gem install github_changelog_generator --version 1.15.2
- name: Generate Release notes
run: github_changelog_generator --user ${{ github.repository_owner }} --project $(echo '${{ github.repository }}' | awk -F '/' '{print $2}') -t ${{ secrets.GITHUB_TOKEN }} --output temp_change.md --release-branch dev --exclude-labels invalid,duplicate --future-release ${{ steps.next-version.outputs.ver }} --since-tag `echo v${{ steps.current-version.outputs.ver }}` --max-issues 0 --no-issues true --date-format %Y/%m/%d
- name: Tweak changelogs
run: |
sed -i '$d' temp_change.md
sed -i 's/\[Quotae\]/\[Quote_a\]/' temp_change.md
sed -i 's/\[learn2draw\]/\[Lexy\]/' temp_change.md;
sed -i 's/\[Voronoff\]/\[tcid\]/' temp_change.md;
echo "VERSION[${{ steps.current-version.outputs.ver }}][${{ steps.date.outputs.date }}]" | cat - temp_change.md | sed '2,6d' | sed -e '/^\*\*.*/,+1 d' | sed -r 's/\[\\#.* \(\[(.*)\]\(.*/\(\1\)/' | sed 's/^-/*/' | cat - changelog.txt > changelog_new.txt
cat CHANGELOG.md | sed '1d' >> temp_change.md
mv temp_change.md CHANGELOG.md
mv changelog_new.txt changelog.txt
- name: Update manifest.xml
run: python3 update_manifest.py --quiet --in-place --set-version=${{ steps.next-version.outputs.ver }}

run: python3 update_manifest.py --quiet --in-place
- name: Push to beta branch
run: |
git commit -am "Weekly beta-${{ steps.current-version.outputs.ver }} release" --allow-empty --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
git push origin beta
git commit -am "Weekly beta release" --allow-empty --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
git push origin HEAD:beta --force
38 changes: 20 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
name: Release next version
on:
on:
workflow_dispatch:
inputs:
sinceTag:
description: 'Gather updates from this tag until now'
required: true
default: 'v2.0.x'
releaseVersion:
description: 'Version number to use for this release'
required: true
default: '2.0.x + 1'
default: '2.x.x'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v2.4.0
with:
ref: 'dev'
- name: Install changelog generator
run: sudo gem install github_changelog_generator --version 1.15.2
- name: Generate Release notes
run: github_changelog_generator --user ${{ github.repository_owner }} --project ${{ github.event.repository.name }} -t ${{ secrets.GITHUB_TOKEN }} --output temp_change.md --release-branch dev --exclude-labels invalid,duplicate,technical --future-release ${{ github.event.inputs.releaseVersion }} --since-tag ${{ github.event.inputs.sinceTag }} --max-issues 0 --no-issues true --date-format %Y/%m/%d
run: >
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token;
gh release view $(basename $(gh release create v${{ github.event.inputs.releaseVersion }} --title "Release ${{ github.event.inputs.releaseVersion }}" --draft --generate-notes)) > temp_change.md
- name: Tweak changelogs
run: >
sed -i '$d' temp_change.md;
sed -i 's/\[Quotae\]/\[Quote_a\]/' temp_change.md;
sed -i 's/\[learn2draw\]/\[Lexy\]/' temp_change.md;
sed -i 's/\[Voronoff\]/\[Tom Clancy Is Dead\]/' temp_change.md;
echo "VERSION[${{ github.event.inputs.releaseVersion }}][`date +'%Y/%m/%d'`]" | cat - temp_change.md | sed '2,6d' | sed -e '/^\*\*.*/,+1 d' | sed -r 's/\[\\#.* \(\[(.*)\]\(.*/\(\1\)/' | sed 's/^-/*/' | cat - changelog.txt > changelog_new.txt;
sed -i '1,8d' temp_change.md;
sed -i '1h;1d;$!H;$!d;G' temp_change.md;
sed -i -re 's/\*\*Full Changelog\*\*: (.*)/\[Full Changelog\]\(\1\)\n/' temp_change.md;
sed -i '/## New Contributors/,$d' temp_change.md;
cp temp_change.md changelog_temp.txt;
cat CHANGELOG.md | sed '1d' >> temp_change.md;
mv temp_change.md CHANGELOG.md;
printf "# Changelog\n\n## [v${{ github.event.inputs.releaseVersion }}](https://github.com/PathOfBuildingCommunity/PathOfBuilding/tree/v${{ github.event.inputs.releaseVersion }}) ($(date +'%Y/%m/%d'))\n\n" | cat - temp_change.md > CHANGELOG.md;
sed -i 's/Quotae/Quote_a/' changelog_temp.txt;
sed -i 's/learn2draw/Lexy/' changelog_temp.txt;
sed -i 's/Voronoff/Tom Clancy Is Dead/' changelog_temp.txt;
sed -i 's/PJacek/TPlant/' changelog_temp.txt;
echo "VERSION[${{ github.event.inputs.releaseVersion }}][`date +'%Y/%m/%d'`]" | cat - changelog_temp.txt | sed '2,4d' | sed -e '/^##.*/,+1 d' | sed -r 's/by @(.*) in http.*/\(\1\)/' | cat - changelog.txt > changelog_new.txt;
rm temp_change.md;
rm changelog_temp.txt;
mv changelog_new.txt changelog.txt
- name: Update manifest.xml
run: python3 update_manifest.py --quiet --in-place --set-version=${{ github.event.inputs.releaseVersion }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3.8.0
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Settings.xml

# Testing
luajit/
spec/test_results.log
spec/test_generation.log
src/luacov.stats.out

# Release
manifest-updated.xml
Expand Down
Loading

0 comments on commit 0cdd6fc

Please sign in to comment.