Skip to content

Commit 211ab23

Browse files
authored
Merge pull request #57 from Telefonica/release
Release v2.0.0
2 parents 9961d41 + cf3fb84 commit 211ab23

File tree

11 files changed

+45
-54
lines changed

11 files changed

+45
-54
lines changed

.github/actions/setup-node/action.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ runs:
2020
with:
2121
node-version-file: .node-version
2222
cache: pnpm
23-
- uses: DamianReeves/write-file-action@v1.3
24-
with:
25-
path: .npmrc
26-
contents: |
27-
@tid-xcut:registry=https://nexus.tid.es/repository/npm-xcut-components/
28-
//nexus.tid.es/repository/npm-xcut-components/:_auth=${{ inputs.npm-token }}
29-
write-mode: append
3023
- name: Install Dependencies
3124
shell: bash
3225
run: pnpm i

.github/workflows/build.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: 2024 Telefónica Innovación Digital
22
# SPDX-License-Identifier: MIT
33

4-
name: Continuous Integration
4+
name: Build
55
on:
66
pull_request:
77
push:
@@ -29,8 +29,6 @@ jobs:
2929

3030
- uses: ./.github/actions/setup-node
3131
id: setup-node
32-
with:
33-
npm-token: ${{ secrets.NPM_TOKEN_XCUT }}
3432

3533
- name: Lint
3634
run: pnpm lint

.github/workflows/init.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ jobs:
5050
uses: actions/checkout@v4
5151

5252
- uses: ./.github/actions/setup-node
53-
id: setup-node
54-
with:
55-
npm-token: foo-token
5653

5754
- name: Build
5855
run: pnpm build

.github/workflows/open-source-checks.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ jobs:
3939

4040
- uses: ./.github/actions/setup-node
4141
id: setup-node
42-
with:
43-
npm-token: ${{ secrets.NPM_TOKEN_XCUT }}
4442

4543
- name: Check License Compliance
4644
uses: Telefonica/check-license-compliance/.github/actions/check-and-comment@v3

.github/workflows/publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
- uses: ./.github/actions/setup-node
15-
id: setup-node
16-
with:
17-
npm-token: ${{ secrets.NPM_TOKEN_WRITE_XCUT }}
1815
- run: pnpm build
19-
- run: pnpm -r publish --no-git-checks
16+
- name: Publish to NPM
17+
env:
18+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
20+
run: |
21+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
22+
echo "@telefonica:registry=https://registry.npmjs.org/" >> ~/.npmrc
23+
pnpm -r publish --no-git-checks

.github/workflows/sync-docs-to-confluence.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ jobs:
3333
[
3434
{
3535
"path": "README.md",
36-
"id": "${{ vars.CONFLUENCE_README_PAGE_ID }}",
36+
"id": "${{ secrets.CONFLUENCE_README_PAGE_ID }}",
3737
"title": "[Cross] Open Source Scaffold"
3838
},
3939
{
4040
"path": "CHANGELOG.md",
41-
"id": "${{ vars.CONFLUENCE_CHANGELOG_PAGE_ID }}",
41+
"id": "${{ secrets.CONFLUENCE_CHANGELOG_PAGE_ID }}",
4242
"title": "[Cross] [Open Source Scaffold] Releases"
4343
}
4444
]
45-
confluence-url: ${{ vars.CONFLUENCE_URL }}
46-
confluence-space-key: ${{ vars.CONFLUENCE_SPACE_KEY }}
45+
confluence-url: ${{ secrets.CONFLUENCE_URL }}
46+
confluence-space-key: ${{ secrets.CONFLUENCE_SPACE_KEY }}
4747
confluence-personal-access-token: ${{ secrets.CONFLUENCE_PAT }}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
#### Deprecated
1212
#### Removed
1313

14+
## [2.0.0] - 2025-04-09
15+
16+
### Changed
17+
18+
* chore: Publish the npm package to the NPM public registry. Rename it to `@telefonica/opensource-scaffold`.
19+
* docs: Add badges to the README file
20+
* docs: Remove references to internal procedures from the README file. Now it is intended to be used by external users also.
21+
1422
## [1.3.0] - 2025-03-28
1523

1624
### Changed

README.md

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
[![Build status](https://github.com/Telefonica/opensource-scaffold/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/Telefonica/opensource-scaffold/actions?query=workflow%3Abuild+branch%3Amain) [![Last commit](https://img.shields.io/github/last-commit/Telefonica/opensource-scaffold.svg)](https://github.com/Telefonica/opensource-scaffold/commits) [![Last release](https://img.shields.io/github/release-date/Telefonica/opensource-scaffold.svg)](https://github.com/Telefonica/opensource-scaffold/releases)
2+
3+
[![NPM downloads](https://img.shields.io/npm/dm/@telefonica/opensource-scaffold.svg)](https://www.npmjs.com/package/@telefonica/opensource-scaffold) [![License](https://img.shields.io/npm/l/@telefonica/opensource-scaffold.svg)](https://github.com/Telefonica/opensource-scaffold/blob/main/LICENSE)
4+
15
# Open Source Scaffold
26

37
## Description
48

5-
This repository contains a set of tools for creating and checking the licensing and standard practices for open source projects.
9+
This repository contains a set of tools for creating and checking the licensing and standard practices in open source projects.
610

711
In detail, it includes:
812

@@ -12,8 +16,7 @@ In detail, it includes:
1216

1317
## Table of Contents
1418

15-
* [Preface](#preface)
16-
* [Supported licenses](#supported-licenses)
19+
* [Supported licenses](#supported-licenses)
1720
* [Usage](#usage)
1821
* [Repository template](#repository-template)
1922
* [Node.js CLI](#nodejs-cli)
@@ -26,14 +29,7 @@ In detail, it includes:
2629
* [Next steps](#next-steps)
2730
* [Configuring the repository](#configuring-the-repository)
2831

29-
## Preface
30-
31-
Before creating a new open source project, you should read the [Practical Guide to Open Source Software at Telefónica](https://telefonicacorp.sharepoint.com/:w:/s/PatentOffice.TMEHI/EV1Yvq2kUhhCgy5FG-lryaYBWLwIRewSMZXsbZJeQ5uhlg?e=Mdrdwh&wdLOR=cCBDCEA92-4CAC-CF4A-BF60-44FC3F909578).
32-
33-
> [!WARNING]
34-
> The tools in this repository are not a replacement for that document, they are just a set of tools to help you follow the guidelines in that document.
35-
36-
### Supported licenses
32+
## Supported licenses
3733

3834
This scaffold is able to create projects with the following licenses:
3935

@@ -66,19 +62,16 @@ That's it! You can now start working on your project. Happy coding! 🚀
6662

6763
This repository also includes a Node.js CLI that can be used to __create or update__ an open source project with the standard files.
6864

69-
To use it, follow these steps:
70-
71-
1. __Login to NPM__: Make sure you are logged in to the _@tid-xcut_ NPM registry. Follow the [instructions in this link](https://confluence.tid.es/display/CTO/%5BCross%5D+NPM+Packages).
72-
2. __Run the CLI__: Run the following command
65+
To use it, run the following command:
7366

7467
```bash
75-
npx @tid-xcut/opensource-scaffold create
68+
npx @telefonica/opensource-scaffold create
7669
```
7770

7871
The CLI will prompt you for the required inputs to create the project, and also will ask you for confirmation before overwriting existing files.
7972

8073
> [!TIP]
81-
> You can also use arguments to provide the required information without being prompted. Read the [inputs](#inputs) section for more information, or run `npx @tid-xcut/opensource-scaffold create --help`.
74+
> You can also use arguments to provide the required information without being prompted. Read the [inputs](#inputs) section for more information, or run `npx @telefonica/opensource-scaffold create --help`.
8275
8376
Once the files are created, you are ready to commit and push the changes to your repository. Happy coding! 🚀
8477

@@ -87,7 +80,7 @@ Once the files are created, you are ready to commit and push the changes to your
8780
8881
### Github Action for checking the open source resources
8982

90-
This repository includes a Github Action that checks that the project contains the files that this scaffolding includes. It can be executed in PRs and pushes, ensuring that the project always remains compliant with the open source guidelines.
83+
This repository includes a Github Action that checks that the project contains the files that this scaffolding includes. It can be executed in PRs and pushes, ensuring that the project always remains compliant with the scaffolding.
9184

9285
> [!TIP]
9386
> This action is automatically added when using the scaffolding tools. So, usually you won't need to add it manually. But in case you need to do so, here you have an example:
@@ -110,7 +103,7 @@ jobs:
110103
uses: actions/checkout@v4
111104

112105
- name: Run check
113-
uses: Telefonica/opensource-scaffold@v1
106+
uses: Telefonica/opensource-scaffold@v2
114107
```
115108
116109
> [!TIP]
@@ -129,7 +122,7 @@ Example:
129122

130123
```yaml
131124
- name: Check Open Source scaffold
132-
uses: Telefonica/opensource-scaffold@v1
125+
uses: Telefonica/opensource-scaffold@v2
133126
with:
134127
log: debug
135128
ignore: "CHANGELOG.md;**/ISSUE_TEMPLATE/**"
@@ -210,13 +203,12 @@ This job uses the [Telefonica/check-spdx-headers action](https://github.com/Tele
210203

211204
## License Compliance check
212205

213-
We want to ensure that the software we build is in compliance with our [licensing guidance](https://telefonicacorp.sharepoint.com/:w:/s/PatentOffice.TMEHI/EV1Yvq2kUhhCgy5FG-lryaYBWLwIRewSMZXsbZJeQ5uhlg?e=Mdrdwh&wdLOR=cCBDCEA92-4CAC-CF4A-BF60-44FC3F909578).
214-
215-
This means that we are not incorporating third party software in the project under a license that is not compatible with the license selected for the overall project, or that is not compatible with the company's open source licensing guidelines.
206+
You should ensure that you are not incorporating third party software in the project under a license that is not compatible with the license selected for the overall project, or that is not compatible with your company's open source licensing guidelines.
216207

217208
For such purpose, this scaffold includes a job in the "Open Source Checks" workflow. This job uses the [Telefonica/check-license-compliance github action](https://github.com/Telefonica/check-license-compliance). The configuration of the action is defined in the `.github/check-license-compliance.config.yml` file. It is filled automatically based on the license provided when creating the scaffold, but it can be also customized manually to fit better your project's needs.
218209

219-
Please review the [licensing guidance](https://telefonicacorp.sharepoint.com/:w:/s/PatentOffice.TMEHI/EV1Yvq2kUhhCgy5FG-lryaYBWLwIRewSMZXsbZJeQ5uhlg?e=Mdrdwh&wdLOR=cCBDCEA92-4CAC-CF4A-BF60-44FC3F909578) when configuring the license compliance check. In case of doubt, please contact the Intellectual Property team, to the email address indicated in such document.
210+
> [!WARNING]
211+
> The configuration of the allowed and forbidden licenses is created according to the Telefónica's open source guidelines, depending of the license you choose for your project. You should adapt it to your company's guidelines if they are different.
220212

221213
![Check License compliance bot](./docs/assets/check-license-compliance.png)
222214

@@ -234,8 +226,8 @@ Once you have used the scaffolding tools to create the resources, you should fol
234226
5. __Finish the README file__: The scaffold creates for you a `README.md` file with some basic information about the project and license, but you should fill it with the information about the project, how to install it, how to use it, etc. But remember to __always keep the "Contributing" and "License" sections__.
235227
6. __Finish the CONTRIBUTING file__: You should do the same with the `CONTRIBUTING.md` file. You should __fill the "Getting Started" section__ with the steps that a contributor should follow to start contributing to the project, and __add as many sections as needed to explain the contribution process__. But you should __always keep the rest of sections__ about the licensing of new files, code of conduct and the CLA.
236228

237-
> [!IMPORTANT]
238-
> Once the repository is ready, ask to your manager to contact with the legal department to review the project and approve the publication before making it public.
229+
> [!WARNING]
230+
> Before publishing the repository, you should ensure that your company's legal department has reviewed it.
239231

240232
## Configuring the repository
241233

@@ -268,4 +260,4 @@ The main branch should be protected by requiring status checks to pass before me
268260
### Final notes
269261

270262
> [!TIP]
271-
> Remember also to provide a good description and topics for the repository in order to make it easier for others to find, use, and hopefully contribute to your project. 😉
263+
> Remember also to provide a good description and topics for the repository in order to make it easier for others to find, use, and, hopefully, contribute to your project. 😉

cspell/node.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ camelcase
44
commonmark
55
esmodules
66
Logform
7+
npmjs

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "@tid-xcut/opensource-scaffold",
3-
"version": "1.3.0",
2+
"name": "@telefonica/opensource-scaffold",
3+
"version": "2.0.0",
44
"type": "module",
5-
"description": "Scaffolding for open source projects. A CLI tool to create open source repositories tools and resources",
5+
"description": "Scaffolding for open source projects. A CLI tool to create open source repositories with standard tools and resources",
66
"packageManager": "pnpm@9.4.0",
77
"scripts": {
88
"build": "pnpm build:library && pnpm build:action",

0 commit comments

Comments
 (0)