1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

Migrate release process from travis to github (#175)

* set fetch depth to 0
* Only snapshot when not tagged
* Run deploy for v* tags
* travis: remove deploy stage
This commit is contained in:
James Hillyerd
2020-09-05 14:21:42 -07:00
committed by GitHub
parent 2934d799ef
commit ce5bfddaa5
2 changed files with 17 additions and 21 deletions

View File

@@ -1,22 +1,25 @@
name: Release (Snapshot)
name: Build and Release
on:
push:
branches: [ "master", "develop" ]
tags: [ "v*" ]
pull_request:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Install Node.js
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Install Elm
- name: Setup Elm
uses: jorelali/setup-elm@v2
with:
elm-version: 0.19.1
@@ -25,8 +28,17 @@ jobs:
npm ci
npm run build
working-directory: ./ui
- name: Build release artifacts
- name: Test build release
uses: goreleaser/goreleaser-action@v2
if: "!startsWith(github.ref, 'refs/tags/v')"
with:
version: latest
args: release --snapshot
- name: Build and publish release
uses: goreleaser/goreleaser-action@v2
if: "startsWith(github.ref, 'refs/tags/v')"
with:
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -25,22 +25,6 @@ jobs:
script:
- "elm-format --validate ."
- "npm run build"
- stage: deploy
go: "1.15.x"
before_install:
- "nvm install 10.19.0"
install:
- "cd ui"
- "npm ci"
- "npm run build"
- "cd .."
script: "curl -sL https://git.io/goreleaser | bash"
addons:
apt:
packages:
- rpm
stages:
- test
- name: deploy
if: tag IS present