minor-update #26
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: minor-update | |
# when to run the workflow | |
on: | |
workflow_dispatch: | |
# instructions the workflow will perform | |
jobs: | |
build: | |
if: github.actor == 'sindre0830' | |
# environment to run on | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
# steps to perform | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
ref: ${{ github.sha }} | |
- name: Bump version and push tag | |
id: tag | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
DEFAULT_BUMP: "minor" | |
- name: Create zipped folder | |
uses: thedoctor0/[email protected] | |
with: | |
type: 'zip' | |
filename: 'RimNauts2.zip' | |
exclusions: '*.zip* *.git* /*Workshop/* /*Source/* /*.github/* .gitignore Changelog.md LICENSE README.md' | |
- name: Create release and attach the zipped folder | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'RimNauts2.zip' | |
bodyFile: "Changelog.md" | |
tag: ${{ steps.tag.outputs.new_tag }} | |
- name: Unzip folder to a temporary location | |
run: | | |
sudo apt-get install unzip | |
mkdir RimNauts2/ | |
unzip RimNauts2.zip -d RimNauts2 | |
- name: Push folder to steam | |
uses: AnarkisGaming/workshop@v1 | |
env: | |
STEAM_ACCOUNT_NAME: ${{ secrets.accountname }} | |
STEAM_PASSWORD: ${{ secrets.password }} | |
with: | |
appID: 294100 | |
publishedFileID: 2880599514 | |
path: "RimNauts2/" | |
changelog: "New update is out! Check out the changelog [url=https://github.com/RimNauts/RimNauts2/releases]here[/url]" | |
- name: Send message to Discord server | |
uses: Ilshidur/[email protected] | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
TAG: ${{ steps.tag.outputs.new_tag }} | |
ROLE_ID: ${{ secrets.DISCORD_ROLE }} | |
with: | |
args: "**{{ TAG }}** New update is out! Check out the changelog here <https://github.com/RimNauts/RimNauts2/releases/tag/{{ TAG }}> <@&{{ ROLE_ID }}>" | |
- name: Send Changelog file to Discord server | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.DISCORD_WEBHOOK }} | |
filename: Changelog.md |