updated build #7
This file contains hidden or 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: stable release | |
| on: | |
| push: | |
| branches: | |
| - "stable/v[0-9]+.[0-9]+.[0-9]+" | |
| permissions: | |
| contents: write | |
| jobs: | |
| test_playwright: | |
| name: Test Playwright - regular | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/[email protected] | |
| - name: Set up Docker Buildx | |
| uses: docker/[email protected] | |
| - uses: actions/setup-node@v4 | |
| - working-directory: frontend | |
| run: npm i && npm run build | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| - working-directory: backend | |
| run: go build -o filebrowser . | |
| - name: Build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./_docker/Dockerfile.playwright-general | |
| push: false | |
| create_release_tag: | |
| needs: [ test_playwright ] | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.PAT }} | |
| - name: Extract branch name | |
| shell: bash | |
| run: | | |
| original_branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | |
| echo "branch_name=$transformed_branch" >> $GITHUB_OUTPUT | |
| tag_name=$(echo "$original_branch" | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+')-stable | |
| echo "tag_name=$tag_name" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| target_commitish: ${{ github.sha }} | |
| token: ${{ secrets.PAT }} | |
| tag_name: ${{ steps.extract_branch.outputs.tag_name }} | |
| prerelease: false | |
| make_latest: true | |
| draft: false | |
| generate_release_notes: true | |
| name: ${{ steps.extract_branch.outputs.tag_name }} |