diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..be50e25 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,64 @@ +stages: + - build + - release + +build-extension: + stage: build + image: ubuntu:latest + tags: + - docker + only: + - tags + rules: + - if: $CI_COMMIT_TAG =~ /^v.*/ + before_script: + - apt-get update && apt-get install -y zip + script: + - | + zip -r sdb-audio-extractor-${CI_COMMIT_TAG}.zip \ + manifest.json \ + popup.html \ + popup.js \ + options.html \ + options.js \ + content.js \ + background.js \ + icon16.png \ + icon48.png \ + icon128.png \ + README.md + artifacts: + paths: + - sdb-audio-extractor-${CI_COMMIT_TAG}.zip + expire_in: 1 week + +create-release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + tags: + - docker + only: + - tags + rules: + - if: $CI_COMMIT_TAG =~ /^v.*/ + dependencies: + - build-extension + script: + - echo "Creating release for $CI_COMMIT_TAG" + release: + tag_name: $CI_COMMIT_TAG + name: 'Release $CI_COMMIT_TAG' + description: | + ## SDB Audio Extractor $CI_COMMIT_TAG + + Chrome extension for extracting audio from YouTube videos to your SDB soundboard. + + ### Installation + 1. Download the `sdb-audio-extractor-${{ steps.tag.outputs.VERSION }}.zip` file + 2. Open Chrome and go to `chrome://extensions/` + 3. Enable "Developer mode" + 4. Drag and drop the zip file onto the extensions page + assets: + links: + - name: 'sdb-audio-extractor-${CI_COMMIT_TAG}.zip' + url: '${CI_PROJECT_URL}/-/jobs/artifacts/${CI_COMMIT_TAG}/raw/sdb-audio-extractor-${CI_COMMIT_TAG}.zip?job=build-extension'