Skip to content

Commit

Permalink
feat: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
LordNoteworthy committed Jul 27, 2021
1 parent be30c68 commit b6e5675
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 10 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
name: UI CI

on:
push:
branches: [main]
pull_request:
branches: [main]

on: [push]
jobs:
yarn-build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [14.x]
Expand All @@ -24,7 +19,7 @@ jobs:
- run: yarn build

docker-build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: UI Release
on: workflow_dispatch
jobs:
docker-release:
runs-on: ubuntu-20.04
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Generate build version
id: prep
run: |
version=$(cat VERSION)
echo "::set-output name=BUILD_VERSION::${version}"
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: saferwall/ui:latest
tags: |
${{ env.IMAGE }}:latest
${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_VERSION }}
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0.0
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "saferui",
"version": "0.1.0",
"name": "saferwall-ui",
"version": "1.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down

0 comments on commit b6e5675

Please sign in to comment.