-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add manual workflow dispatch for merge, build and publish
- Loading branch information
1 parent
cd7f46b
commit 1b05ea1
Showing
1 changed file
with
75 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
|
||
name: 'Manual Merge, Build and Publish' | ||
on: [workflow_dispatch] | ||
permissions: | ||
contents: write | ||
jobs: | ||
merge: | ||
name: Merge the PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Find Pull Request | ||
uses: juliangruber/find-pull-request-action@v1 | ||
id: find-pull-request | ||
with: | ||
branch: l10n_main | ||
- name: Merge Pull Request | ||
if: steps.find-pull-request.outputs.number != '' | ||
uses: juliangruber/merge-pull-request-action@v1 | ||
with: | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
number: '${{ steps.find-pull-request.outputs.number }}' | ||
method: squash | ||
repo: '${{ github.repository }}' | ||
version: | ||
name: Bump Version | ||
runs-on: ubuntu-latest | ||
needs: | ||
- merge | ||
outputs: | ||
tag: '${{ steps.bump.outputs.tag }}' | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Bump Version | ||
id: bump | ||
uses: anothrNick/github-tag-action@d77194f92b4ca48b05df5c20709984535a9cd6e0 | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
WITH_V: true | ||
publish: | ||
name: Build Resource Pack | ||
runs-on: ubuntu-latest | ||
needs: | ||
- version | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Create Resource Pack File | ||
run: (cd Sodium\ Translations && zip -r "../SodiumTranslations.zip" *) | ||
- name: Generate Checksum | ||
run: >- | ||
sha1sum "SodiumTranslations.zip" | cut -d " " -f 1 > | ||
"SodiumTranslations.zip.sha1sum" | ||
- name: Store Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Resource Pack | ||
path: SodiumTranslations.zip* | ||
- name: Release on GitHub | ||
uses: softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d | ||
with: | ||
tag_name: '${{ needs.version.outputs.tag }}' | ||
generate_release_notes: true | ||
files: SodiumTranslations.zip* | ||
- name: Release on Modrinth | ||
uses: Kir-Antipov/[email protected] | ||
with: | ||
modrinth-id: yfDziwn1 | ||
modrinth-token: '${{ secrets.MODRINTH_TOKEN }}' | ||
files: | | ||
SodiumTranslations.zip | ||
dependencies: | | ||
sodium(required){modrinth:AANobbMI}{curseforge:394468}#(ignore:curseforge,github) |