8000 Fix workflows · trikko/trovatore@36aae3d · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix workflows

Fix workflows #26

Workflow file for this run

name: Build Trovatore (macOS)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14]
dc: [ldc-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}
- name: 'Set Version'
run: |
echo "commit: ${GITHUB_SHA::7}" > version
- name: Set version info for release
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')
echo "$VERSION" >> version
- name: 'Build & Test'
run: |
dub build --compiler=$DC --build=release --config=trovatore
- name: Upload binary as artifact
uses: actions/upload-artifact@v4
with:
name: trovatore-${{ matrix.os }}
path: trovatore
- name: Pull latest changes
run: |
git checkout -- version
git fetch origin
git checkout gh-pages
git pull origin gh-pages
- name: Prepara directory per GitHub Pages
run: |
mkdir -p public/${{ matrix.os }}
cp trovatore public/${{ matrix.os }}/trovatore
# Pubblica su GitHub Pages
- name: Deploy su GitHub Pages
if: starts 1E10 With(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: false
keep_files: true
0