Skip to content

Commit 0f07dec

Browse files
authored
ci: Add auto release (#184)
1 parent 444a3a5 commit 0f07dec

File tree

11 files changed

+11768
-2184
lines changed

11 files changed

+11768
-2184
lines changed

.eslintrc.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
22
"root": true,
3-
"extends": "airbnb-base",
3+
"extends": "eslint:recommended",
44
"env": {
55
"node": true,
66
"es6": true
77
},
88
"parserOptions": {
9-
"ecmaVersion": 2018,
9+
"ecmaVersion": 8,
1010
"sourceType": "module"
1111
},
1212
"rules": {
13-
"indent": ["error", 2],
13+
"indent": ["error", 2, { "SwitchCase": 1 }],
1414
"linebreak-style": ["error", "unix"],
1515
"no-trailing-spaces": 2,
1616
"eol-last": 2,
1717
"space-in-parens": ["error", "never"],
1818
"no-multiple-empty-lines": 1,
19-
"no-underscore-dangle": 0,
20-
"no-new": 0,
21-
"prefer-destructuring": 0,
22-
"prefer-object-spread": 0
19+
"prefer-const": "error",
20+
"space-infix-ops": "error",
21+
"no-useless-escape": "off",
22+
"require-atomic-updates": "off"
2323
}
2424
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: release-automated
2+
on:
3+
push:
4+
branches: [ master, release, alpha, beta ]
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v2
11+
with:
12+
persist-credentials: false
13+
- name: Setup Node
14+
uses: actions/setup-node@v2
15+
with:
16+
node-version: 14
17+
- name: Cache Node.js modules
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.npm
21+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.os }}-node-
24+
- name: Install dependencies
25+
run: npm ci
26+
- name: Run semantic-release
27+
run: npx semantic-release
28+
env:
29+
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.releaserc/commit.hbs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
*{{#if scope}} **{{scope}}:**
2+
{{~/if}} {{#if subject}}
3+
{{~subject}}
4+
{{~else}}
5+
{{~header}}
6+
{{~/if}}
7+
8+
{{~!-- commit link --}} {{#if @root.linkReferences~}}
9+
([{{shortHash}}](
10+
{{~#if @root.repository}}
11+
{{~#if @root.host}}
12+
{{~@root.host}}/
13+
{{~/if}}
14+
{{~#if @root.owner}}
15+
{{~@root.owner}}/
16+
{{~/if}}
17+
{{~@root.repository}}
18+
{{~else}}
19+
{{~@root.repoUrl}}
20+
{{~/if}}/
21+
{{~@root.commit}}/{{hash}}))
22+
{{~else}}
23+
{{~shortHash}}
24+
{{~/if}}
25+
26+
{{~!-- commit references --}}
27+
{{~#if references~}}
28+
, closes
29+
{{~#each references}} {{#if @root.linkReferences~}}
30+
[
31+
{{~#if this.owner}}
32+
{{~this.owner}}/
33+
{{~/if}}
34+
{{~this.repository}}#{{this.issue}}](
35+
{{~#if @root.repository}}
36+
{{~#if @root.host}}
37+
{{~@root.host}}/
38+
{{~/if}}
39+
{{~#if this.repository}}
40+
{{~#if this.owner}}
41+
{{~this.owner}}/
42+
{{~/if}}
43+
{{~this.repository}}
44+
{{~else}}
45+
{{~#if @root.owner}}
46+
{{~@root.owner}}/
47+
{{~/if}}
48+
{{~@root.repository}}
49+
{{~/if}}
50+
{{~else}}
51+
{{~@root.repoUrl}}
52+
{{~/if}}/
53+
{{~@root.issue}}/{{this.issue}})
54+
{{~else}}
55+
{{~#if this.owner}}
56+
{{~this.owner}}/
57+
{{~/if}}
58+
{{~this.repository}}#{{this.issue}}
59+
{{~/if}}{{/each}}
60+
{{~/if}}
61+

.releaserc/footer.hbs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{#if noteGroups}}
2+
{{#each noteGroups}}
3+
4+
### {{title}}
5+
6+
{{#each notes}}
7+
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}} ([{{commit.shortHash}}]({{commit.shortHash}}))
8+
{{/each}}
9+
{{/each}}
10+
11+
{{/if}}

.releaserc/header.hbs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{#if isPatch~}}
2+
##
3+
{{~else~}}
4+
#
5+
{{~/if}} {{#if @root.linkCompare~}}
6+
[{{version}}](
7+
{{~#if @root.repository~}}
8+
{{~#if @root.host}}
9+
{{~@root.host}}/
10+
{{~/if}}
11+
{{~#if @root.owner}}
12+
{{~@root.owner}}/
13+
{{~/if}}
14+
{{~@root.repository}}
15+
{{~else}}
16+
{{~@root.repoUrl}}
17+
{{~/if~}}
18+
/compare/{{previousTag}}...{{currentTag}})
19+
{{~else}}
20+
{{~version}}
21+
{{~/if}}
22+
{{~#if title}} "{{title}}"
23+
{{~/if}}
24+
{{~#if date}} ({{date}})
25+
{{/if}}

.releaserc/template.hbs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{> header}}
2+
3+
{{#each commitGroups}}
4+
5+
{{#if title}}
6+
### {{title}}
7+
8+
{{/if}}
9+
{{#each commits}}
10+
{{> commit root=@root}}
11+
{{/each}}
12+
{{/each}}
13+
14+
{{> footer}}

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
1-
# parse-server-s3-adapter
2-
<a href="https://www.npmjs.com/package/@parse/s3-files-adapter"><img alt="npm version" src="https://img.shields.io/npm/v/@parse/s3-files-adapter.svg?style=flat"></a>
3-
[![Known Vulnerabilities](https://snyk.io/test/github/parse-community/parse-server-s3-adapter/badge.svg?targetFile=package.json)](https://snyk.io/test/github/parse-community/parse-server-s3-adapter?targetFile=package.json)
4-
[![codecov.io](https://codecov.io/github/parse-community/parse-server-s3-adapter/coverage.svg?branch=master)](https://codecov.io/github/parse-community/parse-server-s3-adapter?branch=master)
5-
<a href="https://github.com/parse-community/parse-server-s3-adapter/actions?query=workflow%3Aci+branch%3Amaster">
6-
<img alt="Build status" src="https://github.com/parse-community/parse-server-s3-adapter/workflows/ci/badge.svg?branch=master">
7-
</a>
1+
# Parse Server S3 File Adapter <!-- omit in toc -->
82

9-
parse-server adapter for AWS S3
3+
[![Build Status](https://github.com/parse-community/parse-server-s3-adapter/workflows/ci/badge.svg?branch=master)](https://github.com/parse-community/parse-server-s3-adapter/actions?query=workflow%3Aci+branch%3Amaster)
4+
[![Snyk Badge](https://snyk.io/test/github/parse-community/parse-server-s3-adapter/badge.svg)](https://snyk.io/test/github/parse-community/parse-server-s3-adapter)
5+
[![Coverage](https://img.shields.io/codecov/c/github/parse-community/parse-server-s3-adapter/master.svg)](https://codecov.io/github/parse-community/parse-server-s3-adapter?branch=master)
6+
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-server-s3-adapter/releases)
107

11-
# installation
8+
[![npm latest version](https://img.shields.io/npm/v/@parse/s3-files-adapter.svg)](https://www.npmjs.com/package/@parse/s3-files-adapter)
9+
10+
---
11+
12+
The official AWS S3 file storage adapter for Parse Server. See [Parse Server S3 File Adapter Configuration](https://docs.parseplatform.org/parse-server/guide/#configuring-s3adapter) for more details.
13+
14+
---
15+
16+
- [Installation](#installation)
17+
- [AWS Credentials](#aws-credentials)
18+
- [Deprecated Configuration](#deprecated-configuration)
19+
- [Usage with Parse Server](#usage-with-parse-server)
20+
- [Parameters](#parameters)
21+
- [Using a config file](#using-a-config-file)
22+
- [using environment variables](#using-environment-variables)
23+
- [passing as an instance](#passing-as-an-instance)
24+
- [Usage with Digital Ocean Spaces](#usage-with-digital-ocean-spaces)
25+
- [Adding Metadata and Tags](#adding-metadata-and-tags)
26+
27+
# Installation
1228

1329
`npm install --save @parse/s3-files-adapter`
1430

1531
# AWS Credentials
1632

17-
## Deprecation Notice -- AWS Credentials
18-
*the ability to explicitly pass credentials to this adapter is deprecated and will be removed in a future release.*
33+
⚠️ The ability to explicitly pass credentials to this adapter is deprecated and will be removed in a future release.
1934

2035
You may already be compatible with this change. If you have not explicitly set an `accessKey` and `secretKey` and you have configured the environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`, then you're all set and this will continue to work as is.
2136

@@ -41,6 +56,7 @@ For an AWS host:
4156
If for some reason you really need to be able to set the key and secret explicitly, you can still do it using `s3overrides` as described below and setting `accessKeyId` and `secretAccessKey` in the `s3Overrides` object.
4257

4358
# Deprecated Configuration
59+
4460
Although it is not recommended, AWS credentials can be explicitly configured through an options
4561
object, constructor string arguments or environment variables ([see below](#using-a-config-file)).
4662
This option is provided for backward compatibility and will be removed in the forthcoming version 2.0 of this adapter.

0 commit comments

Comments
 (0)