Skip to content

Add permissions stuff #193

Add permissions stuff

Add permissions stuff #193

Workflow file for this run

name: .NET
on:
push:
branches:
- psqldeko
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.300
- name: Restore dependencies Mewdeko
run: dotnet restore src/Mewdeko/Mewdeko.csproj
- name: Restore dependencies Mewdeko.Votes
run: dotnet restore src/Mewdeko.Votes/Mewdeko.Votes.csproj
- name: Build Mewdeko
run: dotnet publish src/Mewdeko/Mewdeko.csproj --no-restore -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=false -p:IncludeNativeLibrariesForSelfExtract=true -p:UseAppHost=true -o output/
- name: Build Mewdeko.Votes
run: dotnet publish src/Mewdeko.Votes/Mewdeko.Votes.csproj --no-restore -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=false -p:IncludeNativeLibrariesForSelfExtract=true -p:UseAppHost=true -o output/
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Zip artifacts
run: |
cd output
find . -name "*.pdb" -delete
zip -r ../MewdekoPsql-win64.zip .
- name: Get current date
id: get_date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Get previous tag
id: prev_tag
run: echo "prev_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Get commit messages
id: commit_messages
run: echo "messages=$(git log --pretty=format:'* %s' ${{ env.prev_tag }}..HEAD)" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: psqldeko-${{ github.run_number }}
release_name: PsqlDeko build ${{ github.run_number }} (${{ env.date }})
body: |
Automated psql build for commit ${{ github.sha }}
# WARNING: Mewdeko on PSQL is in early beta and has missing features. If you find bugs please report them.
## Commits since previous release:
- ${{ env.messages }}
draft: false
prerelease: true
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./MewdekoPsql-win64.zip
asset_name: MewdekoPsql-win64.zip
asset_content_type: application/zip