Skip to content

Commit

Permalink
Switch to single branch development (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
InfiniteStash authored May 20, 2022
1 parent 8105ca7 commit 2ee8a75
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build

on:
push:
branches: [ develop, master ]
branches: [ master ]
pull_request:
branches: [ develop ]
branches: [ master ]
release:
types: [ published ]

Expand Down Expand Up @@ -103,13 +103,13 @@ jobs:
run: make it

- name: Set PR version
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'refs/heads/develop' && github.base_ref != 'refs/heads/master'}}
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'refs/heads/master'}}
run: echo "BUILD_TYPE=PR" >> $GITHUB_ENV
- name: Set Official version
if: ${{ github.event_name == 'release' && github.ref != 'refs/tags/latest-develop' }}
run: echo "BUILD_TYPE=OFFICIAL" >> $GITHUB_ENV
- name: Set Development version
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
if: ${{ github.event_name == 'push' }}
run: echo "BUILD_TYPE=DEVELOPMENT" >> $GITHUB_ENV

- name: Crosscompile binaries
Expand All @@ -125,25 +125,25 @@ jobs:
- name: Upload Windows binary
# only upload binaries for pull requests
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'refs/heads/develop' && github.base_ref != 'refs/heads/master'}}
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'refs/heads/master'}}
uses: actions/upload-artifact@v2
with:
name: stash-box-win.exe
path: dist/stash-box-windows.exe
- name: Upload Linux binary
# only upload binaries for pull requests
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'refs/heads/develop' && github.base_ref != 'refs/heads/master'}}
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'refs/heads/master'}}
uses: actions/upload-artifact@v2
with:
name: stash-box-linux
path: dist/stash-box-linux

- name: Update latest-develop tag
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
if: ${{ github.event_name == 'push' }}
run : git tag -f latest-develop; git push -f --tags

- name: Development Release
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
if: ${{ github.event_name == 'push' }}
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Development Docker
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
if: ${{ github.event_name == 'push' }}
run: |
docker build -t stashapp/stash-box:development -f ./docker/ci/x86_64/Dockerfile ./dist
docker push stashapp/stash-box:development
Expand Down

0 comments on commit 2ee8a75

Please sign in to comment.