Skip to content

Commit

Permalink
Add release to upload action
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikah45 committed Jun 13, 2022
1 parent 836242d commit 5ee7293
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
pacman --noconfirm -S mingw-w64-i686-gcc
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download Patcher
run: curl -L "https://github.com/FAForever/FA_Patcher/releases/latest/download/FaP.exe" -o FaP.exe
Expand All @@ -45,3 +47,43 @@ jobs:
run: curl -f -X "POST"
"https://api.faforever.com/exe/upload" -F "modName=${{ github.event.inputs.modName }}" -F "apiKey=${{ secrets.apiKey }}"
-F "file=@ForgedAlliance_exxt.exe"

- name: Get Latest Tag
id: latest_tag
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
excludes: prerelease, draft

- name: Set Tag
id: set_tag
run: |
baseTag=$(date +v%y.%-m.%-d)
tag=${{ github.event.inputs.modName }}_$baseTag
count=1
while [ $(git tag -l "$tag") ];
do
tag=$baseTag.$count;
count=$(($count+1));
done
echo ::set-output name=tag::$tag
- name: Get Body
id: get_body
run: |
git log --pretty=format:"* %s" ${{ steps.latest_tag.outputs.release }}..HEAD > body.md
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit: ${{ github.sha }}
tag: ${{ steps.set_tag.outputs.tag }}
name: ${{ steps.set_tag.outputs.tag }}
draft:
token: ${{ secrets.GITHUB_TOKEN }}
bodyFile: body.md
generateReleaseNotes: true

0 comments on commit 5ee7293

Please sign in to comment.