forked from cybercase/webminidisc
-
Notifications
You must be signed in to change notification settings - Fork 30
84 lines (72 loc) · 2.34 KB
/
create-zip-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build and Release Zip Archives of Web MiniDisc 💽
on:
push:
tags:
- '*'
jobs:
create-zip-release:
runs-on: ubuntu-20.04
steps:
- name: Install system dependencies 🏗
run: |
sudo apt-get update
sudo apt-get -y install build-essential libudev-dev libusb-1.0-0-dev
- name: Checkout 🛎️
uses: actions/[email protected]
- name: Build Release 🔧
run: |
npm install
npm run build
env:
CI: false # Do not treat warnings as errors
PUBLIC_URL: ./
GENERATE_SOURCEMAP: false
- name: Create Archive 📦
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: 'release.zip'
directory: 'build'
exclusions: '.DS_Store'
- name: Copy no-g Release Archive
run: mv build/release.zip ./
- name: Build no-ga Release 🔧
run: npm run build
env:
CI: false # Do not treat warnings as errors
PUBLIC_URL: ./
REACT_APP_NO_GA_RELEASE: true # disables service workers and GA
GENERATE_SOURCEMAP: false
- name: Create Archive 📦
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: 'release-no-ga.zip'
directory: 'build'
exclusions: '.DS_Store service-worker.js final-service-worker.js extra-service-worker.js'
- name: Copy Release Archive
run: mv build/release-no-ga.zip ./
- uses: ncipollo/release-action@v1
with:
artifacts: "release.zip,release-no-ga.zip"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
replacesArtifacts: true
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/webminidisc:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}