mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-08-28 07:34:33 +00:00
Extract CI scripts in separate files
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// Copyright 2025 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
// Please see LICENSE in the repository root for full details.
|
||||
|
||||
// @ts-check
|
||||
|
||||
/** @param {import('@actions/github-script').AsyncFunctionArguments} AsyncFunctionArguments */
|
||||
module.exports = async ({ github, context }) => {
|
||||
const { owner, repo } = context.repo;
|
||||
const version = process.env.VERSION;
|
||||
const tagSha = process.env.TAG_SHA;
|
||||
|
||||
if (!version) throw new Error("VERSION is not defined");
|
||||
if (!tagSha) throw new Error("TAG_SHA is not defined");
|
||||
|
||||
const tag = await github.rest.git.createRef({
|
||||
owner,
|
||||
repo,
|
||||
ref: `refs/tags/v${version}`,
|
||||
sha: tagSha,
|
||||
});
|
||||
console.log("Created tag ref:", tag.data.url);
|
||||
};
|
||||
Reference in New Issue
Block a user