Skip to content

Commit

Permalink
New release flow (OctoLinker#1540)
Browse files Browse the repository at this point in the history
* Update release flow

* fixup! Update release flow

* Update .github/workflows/release.yml

Co-authored-by: Brian Surowiec <[email protected]>

Co-authored-by: Brian Surowiec <[email protected]>
  • Loading branch information
stefanbuck and xt0rted authored Apr 7, 2022
1 parent 55e1efd commit 2483f2f
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 23 deletions.
57 changes: 40 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
name: Release
on:
push:
tags:
- v*
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install
- run: yarn build
- run: 'yarn release'
env:
CLIENT_ID: ${{ secrets.PUBLISHER_CHROME_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.PUBLISHER_CHROME_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.PUBLISHER_CHROME_REFRESH_TOKEN }}
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
EXTENSION_ID: 'jlmafbaeoofdegohdhinkhilhclaklkp'
- name: Get version from tag
id: tag_name
run: echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash

- name: Checkout repository
uses: actions/[email protected]

- name: Install node
uses: actions/[email protected]
with:
node-version: 16

- run: yarn install
- run: yarn version ${{ steps.tag_name.outputs.current_version }}
- run: yarn build

- name: Package dist folder
run: tar -zcvf octolinker-${{ steps.tag_name.outputs.current_version }}.tar.gz ./dist

- name: Upload release to GitHub
uses: softprops/action-gh-release@v1
with:
files: octolinker-${{ steps.tag_name.outputs.current_version }}.tar.gz

- name: Publish release
run: yarn release
env:
CLIENT_ID: ${{ secrets.PUBLISHER_CHROME_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.PUBLISHER_CHROME_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.PUBLISHER_CHROME_REFRESH_TOKEN }}
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
EXTENSION_ID: 'jlmafbaeoofdegohdhinkhilhclaklkp'
2 changes: 1 addition & 1 deletion assets/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OctoLinker",
"version": "6.10.2",
"version": "0.0.0",
"manifest_version": 2,
"author": "Stefan Buck",
"description": "OctoLinker – Links together, what belongs together.",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "OctoLinker",
"version": "6.10.2",
"version": "0.0.0",
"engines": {
"node": ">= 16",
"npm": ">= 7"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@octolinker/core",
"version": "6.10.2",
"version": "0.0.0",
"description": "OctoLinker browser extension core",
"repository": "https://github.com/octolinker/octolinker/tree/main/packages/core",
"license": "MIT",
Expand Down
3 changes: 0 additions & 3 deletions scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@

sed -E "s/MARKETING_VERSION = [0-9.]+/MARKETING_VERSION = $npm_package_version/" safari/Shared.xcconfig | tee safari/Shared.xcconfig
dot-json assets/manifest.json version $npm_package_version
dot-json packages/core/package.json version $npm_package_version

git add assets/manifest.json packages/core/package.json safari/Shared.xcconfig

0 comments on commit 2483f2f

Please sign in to comment.