Skip to content

Commit

Permalink
feat(SemVer): Added Semantic releases
Browse files Browse the repository at this point in the history
CiJob:
  * Added semantic release
  * Website and docker images now use semantic versioning
  * Live website is updated within few minutes of new release
Readme:
  * Added semantic release badge
  * Added badge to website status
Dockerfile:
  * Removed apt update / upgrade
  • Loading branch information
coolapso committed Oct 23, 2021
1 parent 17b7ce4 commit f5191f5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
35 changes: 35 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "pivpn.io",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "./CHANGELOG.md"
}
],
["@semantic-release/github", {
"assets": [
{"path": "dist/asset.min.css", "label": "CSS distribution"},
{"path": "dist/asset.min.js", "label": "JS distribution"}
]
}],
[
"@semantic-release-plus/docker",
{
"name": "pivpn/pivpn.io"
}
],
],
"devDependencies": {
"@semantic-release/gitlab": "^7.0.3",
"semantic-release": "^18.0.0"
},
"release": {
"branches": [
"master",
]
}
}

27 changes: 20 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
os: linux
dist: focal
services:
- docker
language: node_js
node_js:
- 17

stages:
- name: "Build&Publish"
- name: "publish"
if: type = push

jobs:
include:
- stage: "Build&Publish"
name: "Build&Deploy"
if: type = push
- stage: "publish"
name: "publish"
if: branch = master
env:
- IMAGE=pivpn/pivpn.io
install:
- npm install @semantic-release/github -D
- npm install @semantic-release/changelog -D
- npm install @semantic-release-plus/docker -D
before_script:
- echo $dockerpass | docker login -u $dockeruser --password-stdin
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
script:
- docker build -t $webrepo:$tag .
- docker push $webrepo:$tag
- docker build -t $IMAGE .
- npx semantic-release

1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM nginx

RUN apt update && apt upgrade -y
ADD assets /usr/share/nginx/html/assets
ADD images /usr/share/nginx/html/images
ADD index.html /usr/share/nginx/html
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[![Build Status](https://travis-ci.com/pivpn/pivpn.io.svg?branch=master)](https://travis-ci.com/pivpn/pivpn.io) | **[Is pivpn.io down?](https://stats.uptimerobot.com/8X64yTjrJO)**
[![Build Status](https://travis-ci.com/pivpn/pivpn.io.svg?branch=master)](https://travis-ci.com/pivpn/pivpn.io)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Generic badge](https://img.shields.io/badge/website-status-blue.svg)](https://stats.uptimerobot.com/8X64yTjrJO)


## Contributions

If you want to contribute and have a PR, please make open it to the branch.
If you want to contribute and have a PR, please make open it to the branch.

## HMTL 5 UP Readme File
Read Only by HTML5 UP
Expand Down

0 comments on commit f5191f5

Please sign in to comment.